Here you can find the source of isNimbus()
public static boolean isNimbus()
//package com.java2s; //License from project: Open Source License import java.awt.Toolkit; import javax.swing.UIManager; public class Main { /**/* w w w. j a va 2 s. c om*/ * Determines if current L&F is Nimbus or GTK with Nimbus theme */ public static boolean isNimbus() { // is current L&F Nimbus or GTK with Nimbus theme? return isNimbusLookAndFeel() || isNimbusGTKTheme(); } /** * Determines if current L&F is Nimbus */ public static boolean isNimbusLookAndFeel() { // is current L&F Nimbus? return UIManager.getLookAndFeel().getID().equals("Nimbus"); //NOI18N } /** * Determines if current L&F is GTK using Nimbus theme */ public static boolean isNimbusGTKTheme() { // is current L&F GTK using Nimbus theme? return isGTKLookAndFeel() && "nimbus".equals(Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Net/ThemeName")); //NOI18N } /** * Determines if current L&F is GTKLookAndFeel */ public static boolean isGTKLookAndFeel() { // is current L&F some kind of GTKLookAndFeel? return UIManager.getLookAndFeel().getID().equals("GTK"); //NOI18N } }