It works fine with
URL url1 = ClassName.class.getResource("loginpage_image.jpg");
but on the second line it gives the following error:
line :
panelImage=Toolkit.getDefaultToolkit().getImage(url1);
error :
java.lang.NullPointerException
at sun.awt.SunToolkit.getImageFromHash(Compiled Code)
at sun.awt.SunToolkit.getImage(Compiled Code)
at ClientMain.images(Compiled Code)
at ClientMain.init(Compiled Code)
* at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
but working fine with IE .. ..
isn't it strange
?
regards
Khurram Fakhar