This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Image as a background Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Image as a background" Watch "Image as a background" New topic
Author

Image as a background

Abdullah Sheikh
Greenhorn

Joined: Nov 27, 2000
Posts: 3
Can I use an JPEG or GIF image as a background in JPanel?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
There is not a method in this class to set the background image for a JPanel. You will probably have to override paint() in your JPanel to achieve this. You may get some ideas from this discussion on Sun's web site.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image as a background
 
It's not a secret anymore!