1. Win2000/Netscape 7: instead of the applet, an icon is displayed to
install jre140_01i.xpi. After clicking the link, a message states
that Java 2 already exists on this machine, so do you want to
uninstall or cancel? Despite choosing either option, the browser tries
to install the xpi again without any success.
2. Unix/Netscape 4.79: the applet doesn't even appear.
3. Mac OS9/ IExplorer 5: applet loads upon the first visit to the
webpage. Multiple returns to the webpage will throw this exception:
java.lang.NullPointerException
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java)
at sun.awt.SunToolkit.getImage(SunToolkit.java)
at MapApplet$MapPane.<init>(MapApplet.java:204)
at MapApplet.init(Compiled Code)
I think it's because it has problems reloading an image from the
applet jarfile, in the lines below? Would changing the url to a web
address fix it?
URL url = MapApplet.class.getResource("img.gif");
image = Toolkit.getDefaultToolkit().getImage(url);
I had problems reading an image from the JAR file and found this
workaround. I only needed it for small images (10K or less), so you
may have to make small changes:
InputStream is =
getClass().getResourceAsStream(imgName);
BufferedInputStream bis = new
BufferedInputStream(is);
byte[] byBuf = new byte[10000]; // a buffer
large enough for our image
//
// can be
// byte[]
byBuf = = new byte[is.available()];
//
is.read(byBuf); or something like that...
//
int byteRead = bis.read(byBuf,0,10000);
img =
Toolkit.getDefaultToolkit().createImage(byBuf);
Peter
Digital Photography Reference
http://members.shaw.ca/jonespm2/PJDigPhot.htm
Touchup, an image processing applet
http://members.shaw.ca/jonespm2/software.htm
Health, happiness and healing
http://www.SuperNaturalWoman.com