Re: How to change Swing app to JApplet
JTL.zheng wrote:
...
It seems that JRE allocates only one VM to a firefox, although it has
mult-tabs, mult-applets.
and in the same VM different applets share the same statics.
all the classes in different applets are in the same name-space.
Although I close the tab which showing the applet,its static variables
will still remain....
So long as the browser keeps the VM running,
but..
...and those threads that doesn't be terminated in
destory() will still keep running.
..the Threads may be why the VM is left running.
In other words - stop the threads, and the 'static'
problem *might* be fixed for if the user leaves the
page, and later returns to it.
But it is best to fix the problem with statics
anyway, just in case the end user has two
copies of the same page (with applet that
uses static attributes) open.
is it right?
You seem to be getting there, but there are
still a lot of little details I have not bothered
to speculate on, or dared to mention. ;-)
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200706/1