Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

add Image to Frame

 
sanket karkare
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 903
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sanket karkare
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
kati ameri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this
http://faq.javaranch.com/java/UseOneThreadPerQuestion

[MG Removed thread hijack]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic