R
rikhardw
Hi, I have a problem with an applet. I am trying to load images from a
class that is not the main executing class of the applet, I am using
the following code
Component output_comp;
URL imgurl =
getClass().getClassLoader().getResource(("images/image1.gif"));
Image img = output_comp.getToolkit().createImage(imgurl);
The imgurl that is returned is null so I believe that this is due to
the caller not having adequate privileges to get the resource. Does
anyone know how to fix this problem or know what problem I have?
class that is not the main executing class of the applet, I am using
the following code
Component output_comp;
URL imgurl =
getClass().getClassLoader().getResource(("images/image1.gif"));
Image img = output_comp.getToolkit().createImage(imgurl);
The imgurl that is returned is null so I believe that this is due to
the caller not having adequate privileges to get the resource. Does
anyone know how to fix this problem or know what problem I have?