Handling threads in an Applet
Declare your Applet subclass to implement Runnable.
public void run() {...} //Add this to do the work.
What if the browser goes to another web page or quits?
Provide a way for the browser to not only suspend the main thread, but also to suspend and resume any extra threads:
public void start() { extraThread.resume(); }
public void stop() { extraThread.timeToSleep=true; extraThread.interrupt(); }
public void destroy() { extraThread.timeToQuit=true; extraThread.interrupt(); }