exit code for JApplet
I am writing a JApplet for school. I want to include an exit button, and I am placing System.exit(0) in the actionperformed method for the button, but it does not close the viewer. Is there a code that can be put into the actionperformed method to make the button work like I want it to?
Applets were desinged to be displayed on a webpage viewed through a browser. The applet remains on the page until user navigates to another page or closes the browser. Your desired behaviour does not make sense. You can have a button to stop the applet running but as I said it remains on screen.