Here you can find the source of metalLookAndFeel(JFrame appFrame)
public static void metalLookAndFeel(JFrame appFrame)
//package com.java2s; /******************************************************************************* * Copyright (C) 2011 Atlas of Living Australia * All Rights Reserved.//from w w w. ja va 2 s . com * * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. ******************************************************************************/ import javax.swing.JFrame; import javax.swing.LookAndFeel; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.plaf.metal.MetalLookAndFeel; public class Main { public static void metalLookAndFeel(JFrame appFrame) { changeLookAndFeel(new MetalLookAndFeel(), appFrame); } private static void changeLookAndFeel(LookAndFeel laf, JFrame appFrame) { try { UIManager.setLookAndFeel(laf); SwingUtilities.updateComponentTreeUI(appFrame); } catch (Exception ex) { System.err.println(ex); } } }