Here you can find the source of isXP()
public static boolean isXP()
//package com.java2s; import java.awt.Toolkit; import javax.swing.UIManager; public class Main { public static boolean isXP() { if (isWindows()) { Boolean b = (Boolean) Toolkit.getDefaultToolkit() .getDesktopProperty("win.xpstyle.themeActive"); if (b != null && b) return true; }/*from www . java 2 s . co m*/ return false; } public static boolean isWindows() { Object laf = UIManager.getLookAndFeel(); if (laf.getClass() .getName() .equals("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")) { return true; } return false; } }