Win a copy of Design for the Mind this week in the Design 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