Here you can find the source of setNimbusLF()
public static boolean setNimbusLF()
//package com.java2s; //License from project: Open Source License import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; public class Main { /**/*from w ww .ja va2 s . com*/ * Sets look and feel to Nimbus. * * @return */ public static boolean setNimbusLF() { try { for (LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(laf.getName())) { UIManager.setLookAndFeel(laf.getClassName()); break; } } } catch (Exception e) { // If Nimbus is not available, you can set the GUI to another look and feel. return false; } return true; } }