• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

background image

 
Ramiro Santos
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic