File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
 
Similar Threads
setting image as a background
how to make an image my jpanel background
Image as a background
how to make an image my jpanel background
How do I place image in the background of JFrame ?