Java, Netbeans -> ImageBox

How can I add a static image to my forms? If this were C#, I'd use an imagebox, but looking around Swing, I am not seeing anything that looks like an image control.

Thanks,
Ryan
rossryanAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
yes you can use any image
the other alternative is subclassing a JPanel and implement the painting yourself, here are a couple of examples:

http://helpdesk.objects.com.au/java/how-do-i-paint-a-tiled-image-for-example-as-a-background-of-a-panel
http://helpdesk.objects.com.au/java/how-do-i-display-an-image-that-resizes-according-to-the-size-of-the-panel
0
 
rossryanAuthor Commented:
Isn't this supportive of only icons? Can I use any size image, and resize it to any other size?

-Ryan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.