I have coding a handler for an exit button. The button works fine in Eclipse, which is my IDE, and it closes the applet when clicked. However, when I click on the button to close the applet in the web browser, the applet will not close.
I tried different codes, with System.exit(0), and System.exit(1), but none of them worked.
I also tried with applet.getAppletContext().showDocument(appletClose URL), but for some reason I could not get the right syntax.
If my URL is appletJava.com, would this be correct: