Here you can find the source of setSystemLookAndFeel(Component comp, String lookAndFeelStr)
public static void setSystemLookAndFeel(Component comp, String lookAndFeelStr)
//package com.java2s; //License from project: Open Source License import java.awt.Component; import javax.swing.SwingUtilities; import javax.swing.UIManager; public class Main { public static void setSystemLookAndFeel(Component comp, String lookAndFeelStr) { try {//from w w w .j av a2 s.c o m UIManager.setLookAndFeel(lookAndFeelStr); SwingUtilities.updateComponentTreeUI(comp); } catch (Exception e) { return; } } }