Skip to main content

Exception if webbrowser gets closed

2 replies [Last post]
mikethoms
Offline
Joined: 2008-03-22

I got this exception if i close (DISPOSE_ON_CLOSE) the jframe which contains the webbrowser:

Exception in thread "Thread-8" java.lang.NullPointerException: null pData
at sun.awt.windows.WComponentPeer.hide(Native Method)
at java.awt.Component.removeNotify(Component.java:6533)
at org.jdesktop.jdic.browser.WebBrowser.access$201(Unknown Source)
at org.jdesktop.jdic.browser.WebBrowser$1.run(Unknown Source)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mikethoms
Offline
Joined: 2008-03-22

Thanks works great

chippen
Offline
Joined: 2008-09-30

make sure you instanciate the object passing false so it doesnt auto-dispose

new WebBrowser(false);

then call dispose() on it manually when you need to kill it off.