Here you can find the source of setLookAndFeel()
public static void setLookAndFeel()
//package com.java2s; //License from project: Academic Free License import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; public class Main { public static void setLookAndFeel() { try {/* ww w . j a v a2 s.co m*/ for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { //System.out.println(info.getName()); if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (Exception e) { // If Nimbus is not available, you can set the GUI to another look and feel. } } }