Here you can find the source of isMacAquaLookAndFeel()
public static boolean isMacAquaLookAndFeel()
//package com.java2s; /*/*from ww w . ja va 2 s. c o m*/ * Copyright 2003-2010 Tufts University Licensed under the * Educational Community License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may * obtain a copy of the License at * * http://www.osedu.org/licenses/ECL-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an "AS IS" * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing * permissions and limitations under the License. */ public class Main { private static boolean MacPlatform = false; private static boolean MacAquaLAF = false; private static boolean MacAquaLAF_set = false; /** @return true if the current Look & Feel is Mac Aqua (not always true just because you're on a mac) * Note: do NOT call this from any static initializers the result may be changed by application startup * code. */ public static boolean isMacAquaLookAndFeel() { // we can't set this at static init time because the LAF can be set after that if (MacAquaLAF_set == false) { MacAquaLAF = isMacPlatform() && javax.swing.UIManager.getLookAndFeel().getName().toLowerCase().indexOf("aqua") >= 0; MacAquaLAF_set = true; } return MacAquaLAF; } /** @return true if we're running on an Apple Mac OS */ public static boolean isMacPlatform() { return MacPlatform; } }