Here you can find the source of isWindowsClassicLookAndFeel()
public static boolean isWindowsClassicLookAndFeel()
//package com.java2s; //License from project: Open Source License import java.awt.Toolkit; import javax.swing.UIManager; public class Main { /**/*from w ww . j a va2s. com*/ * Determines if current L&F is Windows Classic LookAndFeel */ public static boolean isWindowsClassicLookAndFeel() { if (!isWindowsLookAndFeel()) { return false; } return (!isWindowsXPLookAndFeel() && !isWindowsVistaLookAndFeel()); } /** * Determines if current L&F is WindowsLookAndFeel */ public static boolean isWindowsLookAndFeel() { // is current L&F some kind of WindowsLookAndFeel? return UIManager.getLookAndFeel().getID().equals("Windows"); //NOI18N } /** * Determines if current L&F is Windows XP LookAndFeel */ public static boolean isWindowsXPLookAndFeel() { if (!isWindowsLookAndFeel()) { return false; } // is XP theme active in the underlying OS? boolean xpThemeActiveOS = Boolean.TRUE .equals(Toolkit.getDefaultToolkit().getDesktopProperty("win.xpstyle.themeActive")); //NOI18N // is XP theme disabled by the application? boolean xpThemeDisabled = (System.getProperty("swing.noxp") != null); // NOI18N boolean vistaOs = System.getProperty("os.version").startsWith("6.0"); return ((xpThemeActiveOS) && (!xpThemeDisabled) && !vistaOs); } public static boolean isWindowsVistaLookAndFeel() { if (!isWindowsLookAndFeel()) { return false; } // is XP theme active in the underlying OS? boolean xpThemeActiveOS = Boolean.TRUE .equals(Toolkit.getDefaultToolkit().getDesktopProperty("win.xpstyle.themeActive")); //NOI18N // is XP theme disabled by the application? boolean xpThemeDisabled = (System.getProperty("swing.noxp") != null); // NOI18N boolean vistaOs = System.getProperty("os.version").startsWith("6.0"); return ((xpThemeActiveOS) && (!xpThemeDisabled) && vistaOs); } }