Java Swing Look and Feel trySetNimbusLookAndFeel()

Here you can find the source of trySetNimbusLookAndFeel()

Description

try Set Nimbus Look And Feel

License

Open Source License

Declaration

private static boolean trySetNimbusLookAndFeel() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.UIManager;

public class Main {
    private static boolean trySetNimbusLookAndFeel() {
        try {//from ww  w .  j ava 2  s . c o  m
            for (final UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
            return true;
        } catch (Exception ex) {
            System.err.println(ex);
        }
        return false;
    }
}

Related

  1. setSystemLookAndFeel(Component comp, String lookAndFeelStr)
  2. setWindowsLook()
  3. setWindowsLookAndFeel()
  4. setWindowsLookLike(Window window)
  5. supportsDarkLookAndFeel()
  6. tryToSetSystemLookAndFeel()
  7. tweakLookAndFeel()
  8. useCrossPlatformLookAndFeel(Component object)
  9. usingAppleLAF()