private void defineAquaSettings ( UIDefaults d ) { try { // Instantiate Aqua but don't install it. Class < ? > lnfClass = Class . forName ( UIManager . getSystemLookAndFeelClassName ( ) , true , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; LookAndFeel aqua = ( LookAndFeel ) lnfClass . newInstance ( ) ; UIDefaults aquaDefaults = aqua . getDefaults ( ) ; // Use Aqua for any menu UI classes. d . put ( "MenuBarUI" , aquaDefaults . get ( "MenuBarUI" ) ) ; d . put ( "MenuUI" , aquaDefaults . get ( "MenuUI" ) ) ; } catch ( Exception e ) { // TODO Should we do something with this exception? e . printStackTrace ( ) ; } }
Use Aqua settings for some properties if we re on a Mac .