Java Swing Look and Feel isWindowsLookAndFeel()

Here you can find the source of isWindowsLookAndFeel()

Description

is Windows Look And Feel

License

Open Source License

Return

Is the current Look&Feel Windows Look&Feel?

Declaration

public static boolean isWindowsLookAndFeel() 

Method Source Code

//package com.java2s;
//it under the terms of the GNU Affero General Public License as published by

import javax.swing.UIManager;

public class Main {
    /**/*from  w ww  .j a  v  a  2 s.c  o m*/
     * @return Is the current Look&Feel Windows Look&Feel?
     */
    public static boolean isWindowsLookAndFeel() {
        try {
            final Class<?> clsLaf = Class.forName("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            // UIManager.getLookAndFeel() instanceof WindowsLookAndFeel ?
            return clsLaf.isAssignableFrom(UIManager.getLookAndFeel().getClass());
        } catch (ClassNotFoundException ex) {
            return false;
        }
    }
}

Related

  1. isWindows()
  2. isWindowsClassicLookAndFeel()
  3. isWindowsClassicLookAndFeel()
  4. isWindowsLaF()
  5. isWindowsLookAndFeel()
  6. isWindowsModernLookAndFeel()
  7. isWindowsUI()
  8. isWindowsVistaLookAndFeel()
  9. isWindowsXPLookAndFeel()