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

booleansupportsDarkLookAndFeel()
supports Dark Look And Feel
if (isDarkLookAndFeel())
    return true;
for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) {
    if (lookAndFeelInfo.getName().contains(DARK_LAF_NAME))
        return true;
return false;
booleantrySetNimbusLookAndFeel()
try Set Nimbus Look And Feel
try {
    for (final UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
            UIManager.setLookAndFeel(info.getClassName());
            break;
    return true;
...
voidtryToSetSystemLookAndFeel()
try To Set System Look And Feel
try {
    setLookAndFeel(getSystemLookAndFeelClassName());
} catch (final Exception ignored) {
voidtweakLookAndFeel()
tweak Look And Feel
if (!isMacOSX())
    return;
UIManager.put("Table.gridColor", Color.gray);
voiduseCrossPlatformLookAndFeel(Component object)
use Cross Platform Look And Feel
String laf;
boolean useNative = false;
if (useNative) {
    laf = UIManager.getSystemLookAndFeelClassName();
} else {
    laf = UIManager.getCrossPlatformLookAndFeelClassName();
try {
...
booleanusingAppleLAF()
using Apple LAF
return UIManager.getLookAndFeel().getClass().getName().startsWith("apple.laf");