Here you can find the source of setSystemLookAndFeel()
public static boolean setSystemLookAndFeel()
//package com.java2s; //License from project: Open Source License import javax.swing.*; public class Main { /**//from w w w .j ava 2 s. com * Tries to set the LookAndFeel to the os default * * @return if the system look and feel could be set */ public static boolean setSystemLookAndFeel() { boolean isSystemLookAndFeelSet = true; try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { isSystemLookAndFeelSet = false; } return isSystemLookAndFeelSet; } }