• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPanel and ImageBackground ?

 
Avin Sinanan
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I am building an apllication. I need to know how to set the background of a JPanel to am image. I already know how to set the background to a color. I need to know how to set it to a Gif file. lets say the gif file is fish.gif
Anyone know how to do this. It must be a JPanel..not a JFrame.
Thanks...
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would make a JPanel something like this...



-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic