Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes JPanel background image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JPanel background image" Watch "JPanel background image" New topic
Author

JPanel background image

Sergei Voropay
Ranch Hand

Joined: Feb 20, 2001
Posts: 31
Is it possible to set an image as a background for JPanel. If possible, how?
John Zukowski
Author
Ranch Hand

Joined: Mar 29, 2001
Posts: 88
Yes. Override paintComponent(). I actually have this example in my book....
------------------
John Zukowski Author of "Definitive Guide to Swing for Java 2" and "Java Collections"


John Zukowski Author of <a href="http://www.amazon.com/exec/obidos/ASIN/189311578X/ref=ase_electricporkchop/107-7882751-0234939" target="_blank" rel="nofollow">"Definitive Guide to Swing for Java 2"</a>,<br /><a href="http://www.amazon.com/exec/obidos/ASIN/1893115925/ref%3Dase%5Felectricporkchop/102-5437230-7785719" target="_blank" rel="nofollow">"Java Collections"</a> and <a href="http://www.amazon.com/exec/obidos/ASIN/1893115984/ref%3Dase%5Felectricporkchop/102-5437230-7785719" target="_blank" rel="nofollow">"Learn Java with JBuilder 6"</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPanel background image