I am a student trying to complete a project that uses your package. I am also relatively new to Java,.The class (attached) is instantiated by a JButton within another JFrame. When an instance is created, it runs as intended; a JWebBrowser is created and runs the desired URL. However, when I close the JWebBrowser manually, the entire code, crashes. I get an "IllegalStateException: the native interface is not open!". It also has an additional effect of closing my entire GUI, not just the JWebBrowser. I have a feeling it has something to do with the EDT, but I am unfamiliar with it. Let me know if you need additional code.
DJ Native Swing is a special project which mixes native components with Swing. This requires certain steps which are specific to this native integration, among which opening the interface and running events in the main of the application.
Hello,
I am a student trying to complete a project that uses your package. I am also relatively new to Java,.The class (attached) is instantiated by a JButton within another JFrame. When an instance is created, it runs as intended; a JWebBrowser is created and runs the desired URL. However, when I close the JWebBrowser manually, the entire code, crashes. I get an "IllegalStateException: the native interface is not open!". It also has an additional effect of closing my entire GUI, not just the JWebBrowser. I have a feeling it has something to do with the EDT, but I am unfamiliar with it. Let me know if you need additional code.
Thanks!
Mystic
Hi Christian,
DJ Native Swing is a special project which mixes native components with Swing. This requires certain steps which are specific to this native integration, among which opening the interface and running events in the main of the application.
For example, take a look at this file:
https://github.com/Chrriis/DJ-Native-Swing/blob/master/DJNativeSwing-SWTDemo/src/chrriis/dj/nativeswing/swtimpl/demo/examples/webbrowser/SimpleWebBrowserExample.java
If event pumping is not done right, it is possible that the program crashes and kills the main application.
Hope this helps,
-Christopher