Link to home
Start Free TrialLog in
Avatar of ksivananth
ksivananthFlag for United States of America

asked on

IE browser not closing with JRE1.5 applet

Hi,

   I have an swing applet which has been loaded in IE using JRE1.5 plugin. Now if I click the close button in the browser, it is not closing but allows me to close after clicking the refresh button.

Any idea?

Note: The applet is been launched using some javascript. i.e., clicking a html button will launch the applet and the applet will be displayed out of the browser, ie., not embeded in the browser.
Avatar of ksivananth
ksivananth
Flag of United States of America image

ASKER

applet is launched through the below JS,

function launchApplet(appName,className){
      var c=document.getElementById("appletContainer");
      c.innerHTML="<applet>...</applet>";
      return false;
}
Avatar of Mick Barry
whats the applet doing, make sure the start() and stop() methods are implemented correctly
ya, they are implemented properly.

FYI, the same app works fine if the plugin is 1.4.2.

BTW, what makes difference here if I don't implement stop()?
strange, not sure what the problem is.
What does your applet do, any threading?

> BTW, what makes difference here if I don't implement stop()?

its more if u do implement stop() and do some long processing.
Yep, it has lot of threads.

The stop method itself is not called. The strange behaviour in browser is, when I clicked the applet launcher button, the IE icon in right top of the browser is changed to inprogress state and it never get to the original.
your stop() method should be closing any threads that have been started.
Note: As soon as click on the applet launcher button, the close button in the browser doesn't work. The application will launch threads only after the user logged in to that.
and at the same time, the close button works fine after click the refresh button in the browser.
try and simple applet that does nothing and see if you get same behaviour
may be a general problem with your installation
any idea what the below exception is and how to workaround,

Exception in thread "Thread-15" java.lang.NullPointerException: null pData
      at sun.awt.windows.WComponentPeer._dispose(Native Method)
      at sun.awt.windows.WComponentPeer.disposeImpl(Unknown Source)
      at sun.awt.windows.WObjectPeer.dispose(Unknown Source)
      at java.awt.Component.removeNotify(Unknown Source)
      at org.jdesktop.jdic.browser.WebBrowser.access$201(Unknown Source)
      at org.jdesktop.jdic.browser.WebBrowser$2.run(Unknown Source)

I think, JDIC browser has some issues with 1.5!
no idea sorry

> I think, JDIC browser has some issues with 1.5!

looks like it
I am able to workaround this problem on my own. I have removed the javascript code and used framesets to load the applet and the IE close proble is not appearing!
How can I close this question?
ASKER CERTIFIED SOLUTION
Avatar of GhostMod
GhostMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial