Here you can find the source of setSystemLookAndFeel(Component c)
Parameter | Description |
---|---|
c | the specified component |
public static void setSystemLookAndFeel(Component c)
//package com.java2s; import java.awt.Component; import javax.swing.SwingUtilities; import javax.swing.UIManager; public class Main { /**//ww w . j a v a 2 s . c om * 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(); } } }