Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Image in Applet

Status
Not open for further replies.

jsulman

Programmer
Jun 14, 2001
85
US
I am having a problem displaying an image in an applet. When I put the image in the class director or anywhere else I get a java.io.FilePermission exception.

I have loaded the gif in a jar but cannot find out how to extract it from within the applet. I have tried various forums but they all give incomplete answers (getClass().getResource(Imagename.gif)) that mean nothing.

Here is the line that I need the image:

item.setIcon(new ImageIcon("Stop16.gif"));

How can I get the Stop16.gif out of the jar so I can use it in the program?

Thanks in advance

Jeff Sulman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top