wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes background image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "background image" Watch "background image" New topic
Author

background image

Ramiro Santos
Greenhorn

Joined: Feb 19, 2004
Posts: 2
Hello,
I'm having some trouble putting a background image on a frame using SWING.
What I have done is to create a panel that takes the entire frame or dialog and then a JLabel which I add to the panel. This label only contains an image that occupies the background. Afterwords I add my other panels to the JLabel and make them trasparent. I find it strange to add panels to a jlabel and so I guess there must be some other way. Any ideas?
Second, I'm having some problems resizing the image in function of the size of the display. Someone know how this can be done?
Thanks a lot
Carlos Failde
Ranch Hand

Joined: Oct 20, 2000
Posts: 84

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: background image
 
Similar Threads
Multiple Panels Background Image
RE: image ico
Adding components dynamically to a nested JPanel
urgent help with adding an image to jframe
Help sorting out what combination of layouts will provide the result I need