Here you can find the source of trySetNimbusLookAndFeel()
private static boolean trySetNimbusLookAndFeel()
//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; } }