How do I stop an applet from running?

John Zukowski

Browsers will constantly call the applet life-cycle methods. There is no way to stop them. The only way to stop an applet from running / displaying anything / taking up CPU time is to set a flag in the code and check it within each of the life-cycle methods. Calling destroy() is not something you as a user / developer should do. Calling the method is the responsibility of the applet container (the browser) when it wants to unload the applet.