Here you can find the source of initLookAndFeel()
public static void initLookAndFeel()
//package com.java2s; /* FILE: Utils.java/*from w w w .j a v a 2s.c o m*/ * DATE OF CREATION: Thu Jan 09 14:14:35 2003 * Copyright (c) Emmanuel Pietriga, 2002-2011. All Rights Reserved * Licensed under the GNU LGPL. For full terms see the file COPYING. * * $Id: Utils.java 4942 2013-02-21 17:26:22Z epietrig $ */ import java.awt.Font; import java.util.Enumeration; import javax.swing.UIManager; public class Main { static Font smallFont = new Font("Dialog", 0, 10); static java.awt.Color pastelBlue = new java.awt.Color(156, 154, 206); public static void initLookAndFeel() { // try {UIManager.setLookAndFeel(currentLookAndFeel);} // catch(Exception ex){System.err.println("An error occured while trying to change the look and feel\n"+ex);} String key; Object okey; for (Enumeration e = UIManager.getLookAndFeelDefaults().keys(); e.hasMoreElements();) { okey = e.nextElement(); // depending on JVM (1.5.x and earlier, or 1.6.x or later) and OS, key = okey.toString(); // keys are respectively String or StringBuffer objects if (key.endsWith(".font") || key.endsWith("Font")) { UIManager.put(okey, smallFont); } } UIManager.put("ProgressBar.foreground", pastelBlue); UIManager.put("ProgressBar.background", java.awt.Color.lightGray); UIManager.put("Label.foreground", java.awt.Color.black); } }