wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: image as background to jpanel
 
Similar Threads
JPanel background image
add background image in JPANEL
Image as a background
how to make an image my jpanel background
Adding a picture