/*
 * @(#)src/demo/jfc/Metalworks/src/Metalworks.java, swing, ds142, 20040714 1.10.2.1
 * ===========================================================================
 * Licensed Materials - Property of IBM
 * "Restricted Materials of IBM"
 *
 * IBM SDK, Java(tm) 2 Technology Edition, v1.4.2
 * (C) Copyright IBM Corp. 2002, 2003. All Rights Reserved
 * ===========================================================================
 */

/*
 * ===========================================================================
 * Copyright (c) 2003 Sun Microsystems, Inc. All  Rights Reserved.
 * ===========================================================================
 */




/*
 * @(#)Metalworks.java	1.11 02/06/13
 */


import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;


/**
  * This application is a demo of the Metal Look & Feel
  *
  * @version 1.11 06/13/02
  * @author Steve Wilson
  */
public class Metalworks {

    public static void main( String[] args ) {
        JDialog.setDefaultLookAndFeelDecorated(true);
        JFrame.setDefaultLookAndFeelDecorated(true);
        Toolkit.getDefaultToolkit().setDynamicLayout(true);
        System.setProperty("sun.awt.noerasebackground","true");

        try {
            javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme( new javax.swing.plaf.metal.DefaultMetalTheme());
            UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
        }  
        catch ( UnsupportedLookAndFeelException e ) {
            System.out.println ("Metal Look & Feel not supported on this platform. \nProgram Terminated");
            System.exit(0);
        }
        catch ( IllegalAccessException e ) {
            System.out.println ("Metal Look & Feel could not be accessed. \nProgram Terminated");
            System.exit(0);
        }
        catch ( ClassNotFoundException e ) {
            System.out.println ("Metal Look & Feel could not found. \nProgram Terminated");
            System.exit(0);
        }   
        catch ( InstantiationException e ) {
            System.out.println ("Metal Look & Feel could not be instantiated. \nProgram Terminated");
            System.exit(0);
        }
        catch ( Exception e ) {
            System.out.println ("Unexpected error. \nProgram Terminated");
            e.printStackTrace();
            System.exit(0);
        }
        JFrame frame = new MetalworksFrame();
        frame.setVisible(true);
    }
}
