Java Utililty Methods Swing Look and Feel

List of utility methods to do Swing Look and Feel

Description

The list of methods to do Swing Look and Feel are organized into topic(s).

Method

booleanisLookAndFeel(String name)
is Look And Feel
return UIManager.getLookAndFeel().getClass().getName().equals(name);
booleanisLookAndFeelNative()
is Look And Feel Native
return UIManager.getSystemLookAndFeelClassName().equals(UIManager.getLookAndFeel().getClass().getName());
booleanisMacAquaLookAndFeel()
is Mac Aqua Look And Feel
if (MacAquaLAF_set == false) {
    MacAquaLAF = isMacPlatform()
            && javax.swing.UIManager.getLookAndFeel().getName().toLowerCase().indexOf("aqua") >= 0;
    MacAquaLAF_set = true;
return MacAquaLAF;
booleanisMacLookAndFeel()
Gets whether the current look and feel is Mac OS X native.
final LookAndFeel laf = UIManager.getLookAndFeel();
return laf.getClass().getName().equals("apple.laf.AquaLookAndFeel");
booleanisMacLookAndFeel()
is Mac Look And Feel
String name = UIManager.getLookAndFeel().getClass().getName();
return name.startsWith("com.apple");
booleanisMacOSXLookAndFeel()
Return true if the current look and feel is the MacOSX look and feel.
LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
if (lookAndFeel == null) {
    return false;
return JDK15_MAC_OSX_LOOK_AND_FEEL_CLASS_NAME.equals(lookAndFeel.getClass().getName())
        || JDK16_MAC_OSX_LOOK_AND_FEEL_CLASS_NAME.equals(lookAndFeel.getClass().getName());
booleanisMetalLookAndFeel()
Returns whether the current applied look and feel is the MetalLookAndFeel
return UIManager.getLookAndFeel() instanceof MetalLookAndFeel;
booleanisMotif()
is Motif
String laf = UIManager.getLookAndFeel().getClass().getName();
if (laf.equals("com.sun.java.swing.plaf.motif.MotifLookAndFeel"))
    return true;
else
    return false;
booleanisMotiflLnF()
Returns whether we're currently running the Motif Look&Feel.
return UIManager.getLookAndFeel().getID().equals("Motif");
booleanisNativeMacLookAndFeel()
is Native Mac Look And Feel
if (!isMac()) {
    return false;
String laf = UIManager.getLookAndFeel().getClass().getName();
return (laf.equals(UIManager.getSystemLookAndFeelClassName()));