FileDocCategorySizeDatePackage
Metalworks.javaAPI DocExample2226Sat Sep 12 03:01:00 BST 1998None

Metalworks.java

/*
 * @(#)Metalworks.java	1.2 98/02/05
 * 
 * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of Sun
 * Microsystems, Inc. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Sun.
 * 
 * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
 * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
 * THIS SOFTWARE OR ITS DERIVATIVES.
 * 
 */


import java.awt.*;
import com.sun.java.swing.*;
import com.sun.java.swing.border.*;


/**
  * This application is a demo of the Metal Look & Feel
  *
  * @version 1.2 02/05/98
  * @author Steve Wilson
  */
public class Metalworks {

    public static void main( String[] args ) {
        System.out.println("Starting Metalworks...");
        try {
	    com.sun.java.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme( new com.sun.java.swing.plaf.metal.DefaultMetalTheme());
	    UIManager.setLookAndFeel("com.sun.java.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);
    }
}