/*
 * BL.java    97/06/26
 *
 */


import java.awt.*;

/**
 * This is similar to the program on page 117 of "Late Night Advanced Java."
 *
 * Note that it uses the deprecated event handling mechanism from 
 * JDK 1.0.  Event handling has been substantially changed in JDK 1.1.
 */

/**
 * This class, BLWindow, is a demonstration of how the border layout
 * manager displays components in a container.
 */

public class BLWindow extends Frame
{

    public BLWindow( String title )
    {
        super( title );
    }
    public boolean handleEvent( Event e )
    {
        if ( e.id == Event.WINDOW_DESTROY )
        {
            System.exit( 0 );
        }
        return super.handleEvent( e );
    }

    public static void main( String[] arg )
    {
        BLWindow f = new BLWindow( "Border Layout Demo" );
        f.setSize( 300,200 );
        f.add( "North", new Button( "North" ) );
        f.add( "West", new Button( "West" ) );
        f.add( "Center", new Button( "Center" ) );
        f.add( "East", new Button( "East" ) );
        f.add( "South", new Button( "South" ) );
        f.show();
    }
}
