View Single Post
  #3 (permalink)  
Old 03-24-2008, 07:29 AM
Eranga's Avatar
Eranga Eranga is offline
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,576
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Using a Jpanel you can easily done this. Why I suggest to use a JPanel is, on top of that you can easily work on with other controls. In some cases of my projects I used JLables also. Add a image on that and do my process. But on a Lable I can't add any other component. But in JPanel you can do it. On working with JLables ToolKit gives a nice support.

Code:
ImageIcon imageBack = new ImageIcon(your_image_Path_here); JLabel background = new JLabel(imageBack); background.setBounds(0, 0, imageBack.getIconWidth(), imageBack.getIconHeight()); getLayeredPane().add(background, new Integer(Integer.MIN_VALUE)); jPanel1.setOpaque(false); setContentPane(jPanel1);
See how I use a Lable and JPanle used here. I think it is clear to you.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote