views:

277

answers:

1

Apple seems to have quart rendering on by default: http://lists.apple.com/archives/Java-dev/2007/Jun/msg00066.html

However there are cases where this is attrociously slow. From a desktop app, I merely add: -Dapple.awt.graphics.UseQuartz=false

This fixes the slow rendering. But there's isn't a place in the Java preferences panel to set this, and all of my attempts to set it in ~/Library/Caches/Java/deployment.properties have failed so far.

Is there a workaround?

Also, will it be possible to generate an applet that sets this for the user in some way?

A: 

I believe what you are trying to do can be solved with this:

System.setProperty("apple.awt.graphics.UseQuartz","false");

Whenever you use the setProperty method, make sure to use it at the beginning of your main method so it gets set as soon as possible or else it may not take effect.

What I don't understand is why it was set to true in Java 1.5 and false in 1.6.

styfle
It won't affect the app if it is set at any time after execution begins (regardless of how early it is in the main method).
jsight
I've successfully set properties that way. This site shows examples: http://www.devdaily.com/apple/mac/java-mac-native-look/Putting_your_application_na.shtmlBut now that I think about it, I don't see that way used on sun.com anywhere so it probably is wrong.
styfle