Here you can find the source of isWindowsXPLookAndFeel()
public static boolean isWindowsXPLookAndFeel()
//package com.java2s; //License from project: Open Source License import java.awt.Toolkit; import javax.swing.UIManager; public class Main { /**//from ww w .j a v a 2 s . c om * 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); } /** * 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 } }