aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JPanel and ImageBackground ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JPanel and ImageBackground ?" Watch "JPanel and ImageBackground ?" New topic
Author

JPanel and ImageBackground ?

Avin Sinanan
Ranch Hand

Joined: Nov 07, 2001
Posts: 109
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...


yours respectfully<br />Avin Sinanan
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

You would make a JPanel something like this...



-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPanel and ImageBackground ?