This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Load image in an Applet

 
Titus Abraham
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,

I am not sure where i am making the mistake.

JLabel contactImage =new JLabel();
contactImage.setIcon(new ImageIcon('cathy.GIF'));
i am adding this label to a panel and that is being added to a JList which is being displayed in an applet.

though this works fine on desktop applications it doesn't work for applet.

i have tried putting all resources in a jar file and signing it but the image doesn't load. JVM console doesnt give me any error too.
my html code for the same is
<APPLET CODE="YagattaApplet.class"
archive="my.jar"
WIDTH=210 HEIGHT=435>
</applet>

where my is having the GIF files

Can you tell me whats wrong ?

Best regards,
Titus
 
Titus Abraham
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It ok.. i didnt use class loader to load the resource ( i was using relative path earlier).
 
Steve Jefferson
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you post any thread please be sure you don't have solution for that and ask others.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you post any thread please be sure you don't have solution for that and ask others.

From the time lapse between Titus' first and second post it seems obvious that he did NOT have the solution when he started this topic.
 
Titus Abraham
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Sherrif. I am new to the language and This site has really helped me to overcome hurdles.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic