AquaLaf setting?

Alexander Potochkin Alexander.Potochkin at oracle.com
Thu Oct 27 04:35:47 PDT 2011


Hello Kevin
> On Oct 26, 2011, at 11:10 AM, Alexander Potochkin wrote:
>
>> Hello everybody
>>
>> I wonder where in our code AquaLaF is set as the default Laf?
>>
> The Aqua LaF is chosen by javax.swing.UIManager.getSystemLookAndFeelClassName() if the OSType is MACOSX and the current toolkit is LWCToolkit (otherwise, we use Metal).

UIManager spec tells the following:

  * The class used for the default look and feel is chosen in the following
  * manner:
  * <li>If the system property <code>swing.defaultlaf</code> is
  *       {@code non-null}, use its value as the default look and feel class
  *       name.
  * <li>If the {@link java.util.Properties} file 
<code>swing.properties</code>
  *       exists and contains the key <code>swing.defaultlaf</code>,
  *       use its value as the default look and feel class name.
  * <li>Otherwise use the cross platform look and feel.

So if you don't use the property file by default, you should be setting 
swing.defaultlaf somewhere.

I wonder what piece of code is responsible for setting system properties 
like this one

Thanks much
alexp

>
>> Is it read from some property file?
>> (Didn't find swing.properties)
>>
> We don't have a swing.properties file by default.  If the user creates the swing.properties file and specifies a different default LaF, we honor their choice.
>
>> Thanks
>> alexp
> -Kevin



More information about the macosx-port-dev mailing list