/* * Authors: Dietolf Ramm * Date: 4/1/02 * Course: CPS 4 * Purpose: PRACTICE JAVA */ public class Applet extends GP.Containers.Applet { GP.Attributes.Values.Counter myLeft; GP.Attributes.Values.Counter myRight; /* * The program starts within this function when the * applet is constructed. */ public Applet () { myLeft = new GP.Attributes.Values.Counter(); myRight = new GP.Attributes.Values.Counter(); GP.Shapes.ValueText right = new GP.Shapes.ValueText(myRight); right.SetColor(new GP.Attributes.Colors.Green()); right.SetPosition(new GP.Attributes.Coordinate(250,100)); right.SetFont(new GP.Attributes.Fonts.Helvetica(20)); GP.Shapes.ValueText left = new GP.Shapes.ValueText(myLeft); left.SetColor(new GP.Attributes.Colors.Blue()); left.SetPosition(new GP.Attributes.Coordinate(150,100)); left.SetFont(new GP.Attributes.Fonts.Helvetica(20)); AddBehavior(new Clock(myLeft, myRight, 2)); } }