Java tutorial
//package com.java2s; import java.awt.Component; import javax.swing.SwingUtilities; import javax.swing.UIManager; public class Main { /** * Set the look and feel of the specified component to the style of the * current system. * * @param c * the specified component */ public static void setSystemLookAndFeel(Component c) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); SwingUtilities.updateComponentTreeUI(c); c.validate(); } catch (Exception e) { e.printStackTrace(); } } }