Here you can find the source of isMacLookAndFeel()
public static boolean isMacLookAndFeel()
//package com.java2s; /*/*from w ww .j a v a 2 s .co m*/ * #%L * VisBio application for visualization of multidimensional biological * image data. * %% * Copyright (C) 2002 - 2014 Board of Regents of the University of * Wisconsin-Madison. * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-2.0.html>. * #L% */ import javax.swing.LookAndFeel; import javax.swing.UIManager; public class Main { /** Gets whether the current look and feel is Mac OS X native. */ public static boolean isMacLookAndFeel() { final LookAndFeel laf = UIManager.getLookAndFeel(); return laf.getClass().getName().equals("apple.laf.AquaLookAndFeel"); } /** Gets the name and class of the current look and feel. */ public static String[] getLookAndFeel() { final LookAndFeel laf = UIManager.getLookAndFeel(); return new String[] { laf.getName(), laf.getClass().getName() }; } }