Java Swing Look and Feel isXP()

Here you can find the source of isXP()

Description

is XP

License

Open Source License

Declaration

public static boolean isXP() 

Method Source Code

//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;
    }
}

Related

  1. isWindowsUI()
  2. isWindowsVistaLookAndFeel()
  3. isWindowsXPLookAndFeel()
  4. isWinLAF()
  5. isWinLAF()
  6. listLookAndFeels()
  7. lookAndFeelDefault(String style)
  8. lookLikeSystem()
  9. matchLnf(LookAndFeel lookAndFeel, UIManager.LookAndFeelInfo lookAndFeelInfo)