This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
 
subject: image as background to jpanel
 
Similar Threads
how to make an image my jpanel background
Image as a background
Adding a picture
JPanel background image
add background image in JPANEL