Re: How to change Swing app to JApplet
If you have two browser windows open on the page
with the applet, both applets may share statics.
I have tried. It does. in defferent tags
tags or tabs? The first implies to me, separate
applets (tags/elements) on the same web page,
the second indicates two web pages open in
different browser tabs.
but it doesn't make sense....It should not share statics between
different applet, should it? is it useful?
As I tried to explain earlier, whether a browser
provides a separate VM for each applet, HTML
frame, HTML page or browser tab /instance, is
entirely up to the browser manufacturer.
If the applets are in the same VM - they will
share a single static member. If they are in
separate VM's, there will be more than one
static member (the static members will be
distinct to each applet).
The developer cannot *rely* on any particular
behaviour. One of the biggest mistakes one
can make when developing applets, is to
assume that *any* other browser acts the
same as the one you test in.
You should avoid using variable statics for many reasons (even if you
call them singletons).
but if avoiding using variable statics,it's difficult to communicate
I should not be too difficult. There are a
number of ways to get information from
one class to another.
How best to do it, could be determined
by the nature of the data, and how and
when it changes.
Message posted via JavaKB.com