/*
 * firstWindow.java    97/06/26
 *
 */


import java.awt.*;

/**
 * This is the program from page 84 of "Late Night Advanced Java."
 * It is a demonstration of how to create and display a simple window
 * with a string written on it.  It also show how to handle the
 * window destroy event.
 *
 * 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 firstWindow extends Frame
{
    public void paint( Graphics g )
    {
        g.drawString( "Here's my first window!", 100, 90 );
    }

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

    public static void main( String[] arg )
    {
        firstWindow f = new firstWindow();
        f.resize( 300,200 );
        f.show();
    }
}
