Static Swing components get GC between pages?
I am trying to keep a complex JFrame with many subcomponents as a static variable in my JApplet. Basically I have a static field in my applet, which contains a reference to the fully created JFrame, which is initialized the first time my applet is loaded in a new JVM (in a new browser).
The applet is loaded on many different pages, and the goal is that everytime a new page is loaded the new applet simply reuses the previously initialized JFrame, using the static field, without going through the whole process of creating them again.
The problem is with the JRE 1.4 (any 1.4.* version I think) in Internet Explorer 6 :
the first time the applet is loaded, the JFrame is created, and then showed fine. If I use the javaScript to open the JFrame again in the same page, it is shown fine again. BUT, if I go to a different page which loads the applet, the JFrame is reused and opens, but the content of the frame is completely blank, and completely useless!
I have tried using a JDialog in the same way, with the same JPanel inside that I used in the contentPane of my JFrame, and the problem is the same, with the exception that the applet is not completely blank, : you can see some of the components, but they are dead, and do not react (i.e texfields are not focusable, comboboxes do not react to click, etc...)
What could be the problem? This does not generate any exceptions at all, the JFrame/JDialog is simply dead, and I cannot re-use it.
Could it be something with the GC? Like the UI peers are discarded when the applet's page is unloaded, even though there are still references to them in the JVM?
This problem does not occur in Safari on Mac.
Thanks for any help/ideas you might have, I googled and searched the forums to no avail.

