GT Computing Home Page

GT Computing Home Page

The FunnyClock Applet

Here's a listing of this simple applet:

//	FunnyClock.java

import java.applet.*;
import linguist.quickshow.*;

public class FunnyClock extends Applet
{
	public Stage stage;

	public void init()
	{
		super.init();

		setLayout(null);

		stage=new FunnyClockStage();
		setSize(stage.WIDTH,stage.HEIGHT);
		add(stage);
		show();
    }
}

The applet is virtually the same as the previous one. Of course, the Stage can equally well be accompanied by other AWT components. As a subclass of Canvas it can appear anywhere a Canvas can.