import java.applet.*;
import java.awt.*;
import java.lang.*;
import java.util.*;


/*
    About class - displays the program and author names.
*/


class AboutBox extends Frame
{
    /*
        PUBLIC METHODS
    */


    /*
        constructor method
    */

    public AboutBox (Panel parent)
    {
        //setBackground (new Color (150, 150, 150));

        setLayout(new BorderLayout());
        Panel topPanel = new Panel();
        topPanel.setLayout(new BorderLayout(0, 20));
        add ("Center", topPanel);

        /* create and add to dialog labels */

		Panel p_text = new Panel();
		p_text.setLayout (new GridLayout (3,0, 10, 10));

        Label l = new Label ("State Machine Simulator", Label.CENTER);
        l.setFont (new Font ("Helvetica", Font.BOLD, 14));
        l.setForeground (Color.blue);
        p_text.add (l);

        l = new Label ("Developed by Kyril Faenov, 1995", Label.CENTER);
        l.setFont (new Font ("Helvetica", Font.ITALIC, 14));
        l.setForeground (Color.blue);
        p_text.add (l);

        l = new Label ("Enhancements by Carsten Kelling, 1996", Label.CENTER);
        l.setFont (new Font ("Helvetica", Font.ITALIC, 14));
        l.setForeground (Color.blue);
        p_text.add (l);
        topPanel.add ("Center", p_text);

        /* create and add to dialog a button */

        Panel p_button = new Panel ();
        p_button.add (new Button ("OK"));
        topPanel.add ("South", p_button);

        /* make sure dialog does not display until specifically told to */

        hide ();

    } /* end AboutBox */


    /*
        during repaint draw a 3d rectangle around the dialog for cooler look
    */


    public void paint (Graphics g)
    {
        //Rectangle bounds = bounds ();

        //g.setColor (getBackground ());
        //g.draw3DRect (0, 0, bounds.width - 1, bounds.height - 1, true);

    } /* end paint */


    /*
        leave some space around the edges
    */

    public Insets insets()
    {
        return new Insets (30, 20, 30, 20);

    } /* end Insets */


    /*
        handle action events (button presses)
    */

    public boolean handleEvent (Event e)
    {
        /* just make the dialog go away */

        if ((e.id == Event.ACTION_EVENT) || (e.id == Event.WINDOW_DESTROY))
        {
            hide();
            return true;
        }

        return false;

    } /* action */

} /* end AboutBox */

