<AWT Dev> sun.awt.disableMixing
Anthony Petrov
Anthony.Petrov at Sun.COM
Mon Sep 14 04:37:43 PDT 2009
Hi Chris,
Unfortunately, the only way to make the property have an effect is to
set it before running any GUI-related code. That's because the value of
the property is being cached (see
sun.awt.SunToolkit.getSunAwtDisableMixing()).
This is made intentionally because the mixing-related code frequently
calls the Component.isMixingNeeded() method that in turn calls the
SunToolkit's one. Re-reading the property each time would introduce a
significant performance degradation.
--
best regards,
Anthony
On 8/31/2009 9:02 PM Christopher Deckers wrote:
> I have an issue with the "sun.awt.disableMixing" property: when my
> code is reached, I have no way to tell whether setting it to true
> would have an effect.
>
> I have such a code:
> if(System.getProperty("sun.awt.disableMixing") == null) {
> System.setProperty("sun.awt.disableMixing", "true");
> }
> but the problem is that if some Swing UI was already loaded, then
> setting this property would note have any effect (that my code assumes
> it worked...). I had this problem with WebStart for example, or some
> other cases where some user UI was loaded before setting it. Would it
> be possible that sun.awt.disableMixing be set when the Swing code
> caches the value?
>
> Better would be that setting the value would actually have an effect
> instead of being ignored, but I doubt this is possible :)
More information about the awt-dev
mailing list