import java.applet.*;
import java.awt.*;

public class PowerHour1 extends Applet
{
	Dialog d;
	int countSeconds=60;
	int countMinutes=60;

	public PowerHour1()
	{
	}

	public String getAppletInfo()
	{
		return "Name: PowerHour JBeta 1\r\n" +
		       "Author: Brian Jahns\r\n" +
		       "Created with Microsoft Visual J++ Version 1.1";
	}


	public void init()
	{
		Frame f=new Frame();
		d=new NewDialog(f,"Power Hour JBeta 1",false);
		d.setLayout(new GridLayout(2,3,10,10));
		d.add(new Label("Seconds: "));
		d.add(new Label(Integer.toString(countSeconds)));
		d.add(new Button("Start"));
		d.add(new Label("Minutes: "));
		d.add(new Label(Integer.toString(countMinutes)));
		d.add(new Button("Stop"));
		d.resize(300,100);
		d.show();

	}

	public void destroy()
	{
	}

	public void paint(Graphics g)
	{
		
	}

	public void start()
	{
	}
	
	public void stop()
	{
	}
}

//
//
//NewDialog
//
//
class NewDialog extends Dialog
{
	NewDialog(Frame f, String title, boolean m)
	{
		super(f, title, m);
	}

	public boolean action(Event evt, Object arg)
	{
		if(evt.target instanceof Button)
		{
			String label=(String)arg;
			if(label.equals("Start"))
				this.run();
			if(label.equals("Stop"))
				this.reset();
			return true;
		}
		else return false;
	}

	public boolean handleEvent(Event evt)
	{
		if(evt.id==Event.WINDOW_DESTROY)
		{
			dispose();
			return true;
		}
		else
		{
			super.handleEvent(evt);
			return true;
		}
	}

	public void run()
	{
	}

	public void reset()
	{

	}
}

