setting sun.java2d.noddraw for applets

That doesn’t seem possible : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6260751

Unfortunately, my game runs as an applet and suffers from frequent freeze when this flag is not set (the game uses the JOGLAppletLauncher).

Is there a java2d guru out there that could propose a better workaround than requesting the user to access its java control panel ?

Lilian

its not possible since teh awt classes are loaded before your applet is.

The only idea I know would be to load an applet before your game loads which is signed and changes the registry (or where the control-panel values are stored) itself instead of relying on the JavaCOntrolPanel.

lg Clemens

Even if you put the property change in a static {…} block within the Applet class?

Code in a static block will be executed before the Applet is constructed - so theoretically, it will execute before the AWT subsystem is initialised (and the noddraw property is read.)

I can’t imagine this idea will work - or someone else would have suggested it already :wink:

Unfortunately it won’t work. The awt/2d subsystem will be initialized prior to
Applet creation.

At this point there’s no way to disable ddraw other than having user
to add the property in the control panel.

Thanks,
Dmitri