Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image as a background

 
Abdullah Sheikh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I use an JPEG or GIF image as a background in JPanel?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic