NewtCanvasAWT crashes JVM in chrome & firefox

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NewtCanvasAWT crashes JVM in chrome & firefox

Artem
I have a problem while making applet using NEWT instead of AWT.
Here is the simpliest example of applet:

public class Applet extends java.applet.Applet{
   
    @Override
    public void init() {
        GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getDefault()));
        NewtCanvasAWT ncawt = new NewtCanvasAWT(glWindow);
        this.setLayout(new BorderLayout());
        this.add(ncawt, BorderLayout.CENTER);
        this.validate();
        glWindow.setVisible(true);
    }
   
}

When I load it everything goes normally. But when applet loses focus and gets it again, jvm and even web browser get stuck.
Now I wonder what I have to do to avoid this situation.
I tried to add FocusListener to the applet, but nothing works, no messages arrived to the console.
InternetExplorer works fine.

Check it out:
launch-applet.html

App.jar
launch-applet.jnlp