Your applet is most likely causing a Security Exception like trying to access local files or opening a Network connection - Use a signed applet.
Tom Scott writes:
Another possibility is that the browser is using an earlier version of Java... I had a problem with using Vectors, and was using the get() method. This came in during jdk 1.2 the browser I was using only used version 1.0 Therefore it will work in the appletviewer and not the browser.