java.lang.NullPointerException
at java.applet.Applet.getCodeBase(Applet.java:67)
at spots3.init(spots3.java:24)
at spots3.main(spots3.java:15)
Appears to be a problem related to grabbing the jpeg. Here's the main
and init:
public static void main(String args[]) {
Frame f = new Frame("Making Spots Fly");
spots3 mac = new spots3();
mac.init();
mac.start();
f.add("Center", mac);
f.resize(601,349);
f.show();
}
public void init() {
theezx = getImage(getCodeBase(), "images/300ZXRED.JPG");
setBackground(Color.white);
}
If I exclude the picture the app runs fine. Any help?
Thanks,
Brian Chase
Wouldn't it be better to check getCodeBase()'s (and getAppletContext(),
probably) return value? I don't like redundancy...
Cheers,
Jean-Michel