This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Transparent Swing components? 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 "Transparent Swing components?" Watch "Transparent Swing components?" New topic

Transparent Swing components?

cardwell cupp
Ranch Hand

Joined: Aug 16, 2001
Posts: 66
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
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
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.
getContentPane().add( JLabel);
" . " (all other components);
I hope that is clear
cardwell cupp
Ranch Hand

Joined: Aug 16, 2001
Posts: 66
Thanks! I will give it a wirl!
Cardwell Cupp
I agree. Here's the link:
subject: Transparent Swing components?
Similar Threads
Passed SCJP2 with 93%
About AWT Components
Making JSF compnents
How many jsps you show on component diagram?