aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes image as background to jpanel 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 "image as background to jpanel" Watch "image as background to jpanel" New topic
Author

image as background to jpanel

Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
hey guys quick question. say i have an image fish.jpg and JPanel panel = new JPanel();

how do i set the background of the JPanel to fish.jpg?

is there a quick and easy way?


("Anger is not an emotion, its a symptom of fear.")
Tim LeMaster
Ranch Hand

Joined: Aug 31, 2006
Posts: 226
This is asked often enough is part of the FAQ.

http://faq.javaranch.com/view?BackgroundImageOnJPanel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: image as background to jpanel