Hi, I'm converting an application to an applet. Basically the application is just JFrame which I try to open from JApplet. The problem is, that in one of the classes: com.mydomain.project.console.ConfigurationComponent I have a line: private static final ImageIcon mailIcon = new ImageIcon(ConfigurationComponent.class.getResource("resources/mail_active.gif")); This should take the image from folder: com/mydomain/project/resources The image is there, when working as an application everyting is fine, but as an applet it throws a NullPointerException, probably because no image is found. How should I do this?
Hi Maciej, You could place the image file in the same directory on the server that your applet is in. Then to access it you just use: getImage( getDocumentBase(), "image.gif" ); from the Applet class. Regards, Manfred.
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad: