Re: program works but wont display in browser




<andrewtitus@xxxxxxxxxx> wrote in message news:ZdWdndSUC8kKJJnZRVn-ig@xxxxxxxxxxxxxxx
Oki found one big error I had class named WebApp.class instead of
WebApplet.class but now get the following error:

java.lang.NoClassDefFoundError: WebApplet$ButtonListener
at WebApplet.init(WebApplet.java:43)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-WebApplet.class"
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Andy

What did you do to fix the error? You didn't simply rename the file to "WebApp.class", did you? The name of the class file must match the name of the public class declared within that file. Your file has a line which reads "public class WebApplet extends JApplet", so the public class is called "WebApplet", and the class file must be named "WebApplet.class".

- Oliver

.


Quantcast