Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image in JFrame ???

 
sachin sharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i call the image into my frame.
 
Matt Hansen
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try this:
 
sachin sharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear matt,
thanks for your reply.
i try this. but it can't work
would please give me detailed coading.
with thanks
sachin
 
Shay Gaghe
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
have you put the image.gif in the same directory where your project placed? if no you should.
try:
jframe.getContentPane().add(label)
instead of:
jframe.add(label);
Shay Gage: gagis@internet-zahav.net

[This message has been edited by Shay Gaghe (edited October 08, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic