How to paste an image upper the tabbed pane

Hello! I have a problem , i want to set the image in the following program at the top
. Can i set the location of the tabbed pane?? and how?
import javax.swing.JTabbedPane;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JTable;
import java.awt.*;
import java.awt.event.*;
public class AdminPane extends JPanel {     
public AdminPane()
ImageIcon icon = new ImageIcon("images/green_phone.gif");
          JTabbedPane tabbedPane = new JTabbedPane();
          Component pane1 = makeTextPanel("Index Page");
tabbedPane.addTab("Home", icon, pane1, "Index Page");
tabbedPane.setSelectedIndex(0);
          Component pane2 = makeTextPanel("Debit Card Tables");
tabbedPane.addTab("Debit Card System", icon, pane2, "Does twice as much nothing");
Component pane3 = makeTextPanel("Merchant Tables");
tabbedPane.addTab("Merchant System", icon, pane3, "Still does nothing");
Component pane4 = makeTextPanel("Administrative Tools");
tabbedPane.addTab("Administrative Tools", icon, pane4, "Does nothing at all");
Component pane5 = makeTextPanel("Database Recure");
tabbedPane.addTab("Database Recure", icon, pane5, "Does nothing at all");
          //Add the tabbed pane to this panel.
setLayout(new GridLayout(2, 0));
          tabbedPane.setBackground(new Color(255, 255, 255));
          add(tabbedPane);
// acquire the image
image = Toolkit.getDefaultToolkit().getImage
("images/green_phone.gif");
MediaTracker tracker = new MediaTracker(this);
tracker.addImage(image, 0);
try { tracker.waitForID(0); }
catch (InterruptedException exception) {}
public void paintComponent(Graphics g)
super.paintComponent(g);
g.drawImage(image, 0, 300, null);
private Image image;
protected Component makeTextPanel(String text)
JPanel panel = new JPanel(false);
JLabel filler = new JLabel(text);
filler.setHorizontalAlignment(JLabel.CENTER);
          //panel.setBackground(new Color(255, 255, 255));
panel.setLayout(new GridLayout(1, 1));
          panel.add(filler);
return panel;
public static void main(String[] args)
JFrame frame = new JFrame("AdminPane");
frame.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e) {System.exit(0);}
frame.getContentPane().add(new AdminPane(),
BorderLayout.CENTER);
frame.setSize(500, 550);
frame.setVisible(true);

Image at the top? Are you talking about the application image? Try setIconImage.
To set the location of the tabbed pane, either use setLocation(...) or use some sort of layout manager
to set the location of the Image relative to the tabbed pane, do
Point p = tabbedpane.getLocation();
Image.setLocation(p.x-d,p.y-c);

Similar Messages

  • How to add an Image in the Tab strip of a Tab

    Hi,
    I am trying to add an image to the Tabstrip of a Tab UI element. I have declared a context variable of type string and also added the gif file into the \src\mimes\Components\ folder.
    How can I assign the context variable to point to this Image? I am not sure how to go about binding the Image.Source property of the context. Will be of great help if someone can throw more light in this area.
    Thanks for all your help in advance.
    Best regards,
    Divya

    Hi Divya,
    you could do for example in the wdDoInit() of the view
    wdContext.currentContextElement().setPicture("picture.gif");
    Now you assign this context variable to the Tab using the Tab_header's imageSource-Property. When you click on its value column, you see a button with three dots on it. If you click on this button, you will get all context nodes and attributes for this View. Usable variables are clearly marked, you now choose the one named Picture or what ever name you prefer to use. But it must correspond to the one set in the wdDoInit.
    I think setting a picture (not necessarily for the tab-page) is done in one of the excellent tutorials. If you are a newcomer I strongly recommend doing some of the tutorials.  I have learned tremendously from them.
    Hope this helped
    Harald

  • How to paste an image from the database by creating a new page?

    Hai,
    i'm trying to paste more than 6 images in two pages...
    The condition is that i want to paste only 3 images in a page.
    When the first 3 images were pasted... i want a new page to be automatically created and the next or 4th image will be pasted on the
    next page...
    i have codings for creating a new page and for pasting the image...
    But how shall shall i paste the 4th image in the next page...
    Can any one plzz explain me...

    >
    Hi, I'd like to display a dynamic image from the web inside a JLabel or any other swing component it could work in. I've been looking on the Swing tutorials and others forums, all I can have is that a JLabel can load an Icon object, defined by an image URL, but can this URL be like "http://xxxxx/image.jpg" somehow or can it only be a local image URL?>
    I do not know why you start talking about an image on the web then go on to show concerns about whether it will work for a 'local' URL.
    But perhaps this answer will cover the possibilities.
    So long as you can from an URL to the image, and the bytes are available for download (e.g. some web sites wrap a direct call to an image in HTML that embeds the image), the URL based icon constructors will successfully load it.
    It does not matter if that URL points to
    - a web site,
    - a local server ('localhost'),
    - an URL representation of a File on the local file system, or
    - it is inside a Jar file that is on the application's run-time classpath.
    How you go about forming a valid URL to a 'local resources' (or indeed what you regard as local resources) is another matter, depending on the form of the project, and how the resources are stored (see list above).
    Probably the main reason that examples use images at a hard coded URL on the net is that it makes an 'image example' self contained. As soon as we compile and run it, we can see the result. I have posted a few examples like that on these forums.
    Edit 1:
    BTW - Welcome to the Sun forums
    Edited by: AndrewThompson64 on Apr 21, 2009 12:15 PM

  • How do I transfer images from the assets pane over to the library pane?

    Hi!
    Wouldn’t that make sense to be able to quick drag n’ drop items from the assets-pane over into the library-pane?
    …Making the workflow smoother.
    This would help a lot in order to structure the folder’s hierarchy/content – e.g. in Hero_images; Logos; Whatever.
    Otherwise, it’s quit fastidious:
    Assuming I’ve already done some work in a project. Let’s say I have 70 images in my assets pane.
    - I select each image, go to usage in the layout
    - I context-menu-click in order to place the image into the library/Hero_images-folder
    - Times seventy, oughf!     :*
    Drag n’ dropping from one pane to the other would be much comfortable, no?
    Or did I missed something?
    Any hints would be much appreciated!
    Cheers

    Insert the SD card into the iMac. Drag the photos from the iMac to the SD card.
    If you want you can create a new folder on the SD card by selecting the SD card/Finder Menubar/File/New Folder

  • How to paste pictures, images from the clipboard

    Hey all,
    I've made a java-application and with a click on a button, I jump to a drawprogram.
    When I've finished my picture, copied it to the clipboard(ctrl c), I want to show it in my application.
    How can I do this and in which component must I paste it?
    Thanks

    There isn't a way to do it that is part of Lightroom. There is a plug-in that might help you, though. Check it out here: Locktastic
    It doesn't say if its compatible with LR4, but you can try it to find out.
    Plug-ins aren't usually as efficient as built-in functionality (like PM), but it might be a solution for you.

  • How do I copy and paste an image form the internet to Keynote. I have done this successfully in the past by selecting copy and then paste by using the right click function and now am unable to do so. I am thinking it is an outdate OS problem...not sure.

    How do I copy and paste an image from the internet to Keynote. I have done so successfully in the paste by using the copy and paste right click functions but am unable to do so now. That was about a year ago that I attempted that I was able to do this. Thank you for your help.

    Some images are copy-protected.
    If all else fails, you can make a screen shot of the image: 
    With the image visible in your browser, press CMD-Shift-4 and your cursor will change to crosshairs.
    Position the cross hairs at one of the corners of what you want to copy and drag to the opposite corner, then release the mouse. An copy of the image will be saved to your desktop.
    You can now edit and use this image.
    Be sure to respect copyrights.
    Message was edited by: bwfromspring hill

  • Lately, I'm unable to paste any image into the body of any email I compose. I did not have this issue before today. Please help.

    Could this issue with not being able to copy and paste any image within the email body, be virus or malware related?
    Though I don't think I have any virus problems. Also I have all the latest updates for Thunderbird.
    I read some suggestions posted elsewhere and tried those but none of these worked :
    DID NOT WORK #1 :
    (If your Thunderbird email message is displaying strange-looking code (tags) after each link, images are missing (it looks like images have been stripped out), and the font appears different, or bold, then you’ve most likely changed the message body view inadvertently. To switch it back, simply:
    Browse to View -> Message Body As -> and select Original HTML.)
    DID NOT WORK #2 :
    Email message looks fine, but doesn’t contain images
    If the rest of your Thunderbird email message looks okay, but is missing images, or they appear to have been stripped out, it’s very possible that you’ve changed a setting that won’t let attachments (ie. pictures) appear inline (within the message body). To change this back, simply:
    Browse to View -> and select Display Attachments Inline. )
    DID NOT WORK #3 :
    If you made the above changes to your Thunderbird settings and images still aren’t appearing in some of your messages, it may be that Thunderbird is blocking them because it thinks they are spam. To adjust your privacy settings and prevent the images from being stripped out, or not displaying at all (ie. being blocked), simply:
    Click on the button to the above right of the email message asking you whether you would like to load images.
    If the email message is from a trusted sender, you can click the link above the message specifying you would always like to load images in messages from this particular sender.
    DID NOT WORK #4 :
    If you’re still having troubles, or your changes aren’t being saved (ie. next time you open Thunderbird the images won’t display again) you can directly specify the default format Thunderbird should display email messages as in the config editor. To access it, simply:
    Browse to Tools -> Options -> Advanced tab -> Config Editor
    Search for mail.default_html_action and make sure it is set to 3 (allow original HTML). If you would like messages to open as text only (more secure, but you won’t see images, change the setting to 1).
    Could you please suggest what possibly has caused this issue? Thank you for your time.

    Thank you for your response.
    After searching around for any pointers to my problem, the above fixes I listed were the things that came closest to maybe addressing the issue, that I was able to locate. But since none worked, and as you pointed out, it is now clear they will only help towards viewing sent images rather than helping with inserting any images in the body of the email, which is the problem I suddenly started facing today.
    Coming to your suggestion, on opening the Write window, the Insert choice on the menu bar is indeed available. And I had already tried using that, by clicking on the '''Insert ----> Image''' option listed. That opens
    up the "Image Properties" box but using that has not resolved the matter either. It results in an image box getting inserted within the email but without the actual image itself.
    Plus, normally I am able to use the '''Paste''' function in the Edit menu or through right-click, but today the (Cut/Copy/Paste) functions have gone inactive, thereby disallowing me to use that to place an image within the email.

  • Copy and paste a image to the clipboard

    Hi,
    Is there anybody who knows how to copy and paste an image to the clipboard in jdk 1.3.0.
    I want make a image copy of my app like this (Panel):
    Image image = (Image)this.createImage(this.getWidth(), this.getHeight());
    Graphics g = image.getGraphics();
    this.paint(g);
    BufferedImage bufImage = (BufferedImage)image;
    Now i will send this bufImage or the image to the clipboard.
    How will it works?
    Thanks a lot.

    Hi,
    I m having similar type of problem but with JPanel not with image. i m able to copy paste a JPanel using same clipboard but i want some more operations like after zoomin my JPanel , i want that now if i copy the image of Jpanel it should be the copy of original size of JPanel not the zoomed one but in my application it is showing the blank picture
    for zoom fit size of JPanel its working ok.
    please advice me what should i do

  • How to paste screen shot in the forum editor

    please help
    how to paste screen shot in the forum editor

    Do you see the "Attach Files" button in between the "Preview" and "Post Message" buttons when posting a question or reply? 
    This is how you would attach an image, you can't embed it into the text here.  Also,  I thought that the "Attach Files" functionality had been removed for performance reasons, but you can try it if you see the button.
    Regards,
    Rich Heilman

  • How to have multiple images on the same screen? like in the movies where you see several actions at

    how to have multiple images on the same screen? like in the movies where you see several actions at the same time ....
    i don't find  a tutorial in adobe tv....
    thanks !!

    The short answer is that you'll put the source clip(s) for each inset on a different video track, all stacked up. Then use the Scale and Position effects (under "Motion" on the Effect Controls panel) to reduce their size and place them where you want.
    If the content of an inset will involve edited content (where you're cutting among various clips or just trimming out unwanted content from a single clip), then you'll probably find it easier to do all those edits in one sequence, then nest that sequence in the master sequence, where you apply the Scale and Positioning effects. That will save the step of applying the scale and position effects to each edited track item.

  • Pages 5.0 : impossible to paste an image in the header

    hi, with the previous version of Pages, you can paste an image in the header to get it on every page. Now it seems to be impossible. Does anyone found a solution ? Thanks.

    Images in headers & footers is just one of the many, many features that have been eliminated or changed. Leave feedback for the Pages team using the link in the Pages menu.

  • In iPhoto, how can I export images with the metadata - including the title and caption information - intact as part of the image?

    In iPhoto, how can I export images with the metadata — including the title and caption information — intact as part of the image?

    Check those boxes in the export dialogue - Exporting From iPhoto
    LN

  • How do i copy images from the web?

    How do I copy images on the web for use in a powerpoint presentation?

    Drag them to the desktop or control-click them and choose to copy them to the clipboard.
    (61484)

  • How to set the focus to the tabbed pane title?

    Dear Friends,
    I'm using tabbed pane (JTabbedPane) in my application. I have 2 tabbed panes and each contain some text fields and buttons.
    In first tabbed, I have 2 text fields, OK and Cancel buttons. I have to set the focus to the title of the tabbed pane after it lost focus from the Cancel button (focus has to move from Cancel button to tabbed pane title by pressing tab key).
    Could anyone please tell me how to set the focus to the tabbed pane title?
    Thanks in advance,
    Sathish kumar D

    Thanks for your reply.
    Could you please tell me how to set focus for title of the tabbed pane throug FocusTraversalPolicy?
    because usually we set the focus for the component by requestFocusInWindow().
    for example set focust to the button OK,
    btnOk.requestFocusInWindow()likewise could you tell me how to set focus to Title of the tabbed pane?
    Sathish kumar D

  • Every page I create in iWeb becomes a tab. How do I 'collapse' some of the tabs under one of the other pages?

    Every page I create in iWeb becomes a tab. How do I 'collapse' some of the tabs under one of the other pages?

    Just for future reference, iWeb has its own forum, in the iLife section, at  https://discussions.apple.com/community/ilife/iweb 

Maybe you are looking for

  • How do I get my contacts and pictures back after getting another Iphone?

    I just got another Iphone4 from apple today as my older one got broken. After I plugged in my Iphone it did the whole back up thing but all of my contacts and my photos have been erased from my Iphone. I'm wondering how I'm able to get them all back.

  • Pages 5.0 missing connecting text boxes/Old version not in Time Capsule

              I have upgraded to Mavericks ... also Pages 5.0 ... I am prepping my year end documents and when opening the docs, notice that I have to UPGRADE the document to work with this version. Once in, I see there are many features that are broken.

  • No VPN with WRT54G V7

    I have just installed a WRT54G V7. All is working apart from VPN. Works fine when connected directly to modem but not via wireless router. I get VPN Error 718. I have tried the Linksys knowledge base suggestions, but no success. I have read the exten

  • GRC AC Request Role Creation

    Hello all, I noticed that by default GRC AC doesn´t have a Request Type for Role Creation. Normally how this is done? I mean, if someone realizes that a new role is necessary, how can this person report the need for a new role creation? What are my o

  • Can't switch my Nokia 6300 on

    I can't get my 6300 to switch on. When I press the power button the two blue lights on the side of the phone light up but it doesn't turn on. They light up for as long as I hold down the power button but then go out when I release it. I've charged th