Here you can find the source of setLookAndFeel()
public static void setLookAndFeel()
//package com.java2s; /**/*from ww w.j a v a 2 s .c o m*/ * Copyright (c) 2010 Simon Denier * Released under the MIT License (see LICENSE file) */ import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class Main { public static int SPINNERHEIGHT = 25; public static void setLookAndFeel() { if (UIManager.getLookAndFeel().getID().equals("Aqua")) { //$NON-NLS-1$ SPINNERHEIGHT = 20; } else { // try to use Nimbus unless on Mac Os try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); //$NON-NLS-1$ } catch (Exception e) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException e1) { e1.printStackTrace(); } catch (InstantiationException e1) { e1.printStackTrace(); } catch (IllegalAccessException e1) { e1.printStackTrace(); } catch (UnsupportedLookAndFeelException e1) { e1.printStackTrace(); } } } } }