/*
 * buttonWindow.java    97/06/26
 *
 */


import java.awt.*;

/**
 * This is the program from page 85-6 of "Late Night Advanced Java."
 * It shows how to put a single button component onto a container.
 *
 * Note that it uses the deprecated event handling mechanism from 
 * JDK 1.0.  Event handling has been substantially changed in JDK 1.1.
 */

public class buttonWindow extends Frame
{
    public boolean handleEvent( Event e )
    {
        if ( e.id == Event.WINDOW_DESTROY )
        {
            System.exit( 0 );
        }
        return super.handleEvent( e );
    }

    public static void main( String[] arg )
    {
        buttonWindow f = new buttonWindow();
        f.add( "South", new Button( "button" ) );  // Border layout mgr is
        f.resize( 300,200 );			   // the default layout
        f.show();				   // mgr for a Frame.
    }
}
