Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPanel background image

 
Sergei Voropay
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to set an image as a background for JPanel. If possible, how?
 
John Zukowski
Author
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic