Here you can find the source of setLookAndFeel()
public static void setLookAndFeel()
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Gabriel Skantze.//w w w . j av a 2 s . co m * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html * * Contributors: * Gabriel Skantze - initial API and implementation ******************************************************************************/ import javax.swing.UIManager; public class Main { public static void setLookAndFeel() { try { UIManager.setLookAndFeel(UIManager .getSystemLookAndFeelClassName()); } catch (Exception e1) { e1.printStackTrace(); } } }