Java JFrame metalLookAndFeel(JFrame appFrame)

Here you can find the source of metalLookAndFeel(JFrame appFrame)

Description

metal Look And Feel

License

Open Source License

Declaration

public static void metalLookAndFeel(JFrame appFrame) 

Method Source Code

//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);
        }
    }
}

Related

  1. maxamiseWindow(JFrame window)
  2. maximizeJFrame(JFrame f)
  3. maximizeWindow(JFrame window)
  4. maxIt(JFrame jFrame)
  5. messageDialog(String string, JFrame parentFrame)
  6. minimize(JFrame frame)
  7. msgBox(JFrame frame, String title, String message)
  8. newDialog(JFrame owner, String title, JPanel content)
  9. newExitActionListener(final JFrame jFrame)