
import java.applet.*;

/* This code can be run as a java program or as an applet. */

public class ClockMainAndApplet extends Applet
{
	ClockFrame clock = null;

	public void start ()
	{
		clock = new ClockFrame (this);
	}

	public void stop ()
	{
		clock.destroy ();
		clock = null;
	}

	public void playTick ()
	{
		play (getCodeBase (), "tick2.wav");
	}

	public static void main (String[] args)
	{
		ClockFrame clock = new ClockFrame (new ClockMainAndApplet ());

		while (clock.is_not_closed ())
		{
			clock.repaint ();
			try { Thread.sleep (100); }
			catch (InterruptedException e) { }
		}

		clock.destroy ();
		clock = null;
	}
};

