I\'ve got a question about a particularly annoying error that I haven\'t been able to figure out, much less overcome. Any time I try to run a Java applet (Applet or JApplet) on
InvocationTargetException
1 is thrown because the HTML is calling (trying to load) something that is not an applet. Change it to:
Also, as mentioned in the answer of Stephen C. Move the stuff from the constructor into the init()
method.
InvocationTargetException
is a checked exception that wraps an exception thrown by an invoked method or constructor.
Ensure the Java Console is configured to show for applets & JWS apps. If there is no output at the default level, raise it and try again.
While I'm here: Why code an applet? If it is due to spec. by teacher, please refer them to Why CS teachers should stop teaching Java applets.