Here you can find the source of setLookAndFeel(String lafName)
public static void setLookAndFeel(String lafName) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
//package com.java2s; //License from project: Apache License import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.UIManager.LookAndFeelInfo; public class Main { public static void setLookAndFeel(String lafName) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { for (LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels()) { if (lafName.equals(laf.getName())) { UIManager.setLookAndFeel(laf.getClassName()); }/*from w ww.j av a2s .co m*/ } } }