0

Possible Duplicate:
How to set background image in Java?

I am trying to put a background image on my java gui, and I can't figure out how to do it. I've looked around and tried some code but I can't get it to work. I have the imageicon setup but I don't understand where I'm suppose to put this at. Please help!

Community
  • 1
  • 1
user541597
  • 4,247
  • 11
  • 59
  • 87

2 Answers2

1

Read the section from the Swing tutorial on How to Use Icons for an example of displaying an icon.

Then, depending on your requirement, Background Panel explains how you can then use the JLabel with the icon as a background image.

camickr
  • 321,443
  • 19
  • 166
  • 288
0

Could this solve your problem? It's an explanation code which shows how you can put a background-image to a panel :) http://www.java2s.com/Code/Java/Swing-JFC/Panelwithbackgroundimage.htm

Xavjer
  • 8,838
  • 2
  • 22
  • 42