The javadoc and tutorial have information about the four applet lifecycle methods (init() -> start() -> stop() -> destroy()
). But they talk mostly in abstract language.
What I'm looking for are concrete examples of when it makes a difference if I put my code in init
vs start
, and similarly for destroy
vs stop
. The only thing I've found so far is in the tutorial's description of the destroy
method. It says:
Note: Keep implementations of the destroy method as short as possible, because there is no guarantee that this method will be completely executed. The Java Virtual Machine might exit before a long destroy method has completed.
(I'm a bit shocked that the above isn't in the javadoc.)
Edit: to be more specific: Can anyone provide a browser + JVM combo that, upon some specific action (switching tabs, hitting the 'back' button, etc.), invokes stop
but not destroy
(or start
but not init
)?