• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transparent Swing components?

 
cardwell cupp
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, and thanks in advanced.
I was wondering if there was a way to have a picture be the background so that when other components were laid on top, you could still see the back ground through it. Is that possible?
Thanks for any ideas
Cardwell
 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes simply add your image to a JLabel and make the label the size of your Jframe. And make sure to add the label first.
eg
getContentPane().add( JLabel);
" . " (all other components);
I hope that is clear
------------------
 
cardwell cupp
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I will give it a wirl!
Cardwell Cupp
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic