GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes add Image to Frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "add Image to Frame" Watch "add Image to Frame" New topic
Author

add Image to Frame

sanket karkare
Greenhorn

Joined: Jan 12, 2009
Posts: 10
Label,Button etc. are Component. So i can add them to Frame.
How i can add an image to frame.
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
sanket karkare wrote:Label,Button etc. are Component. So i can add them to Frame.
How i can add an image to frame.


A String is not a Component either. So how do you add a String to a Frame? You use a JLabel to hold the String.

Similarly, you may use a JLabel to hold an image.

bitguru blog
sanket karkare
Greenhorn

Joined: Jan 12, 2009
Posts: 10
Thanks
kati ameri
Greenhorn

Joined: Mar 04, 2009
Posts: 4
Please read this
http://faq.javaranch.com/java/UseOneThreadPerQuestion

[MG Removed thread hijack]
 
GeeCON Prague 2014
 
subject: add Image to Frame