FileDocCategorySizeDatePackage
GUIClock.javaAPI DocExample578Tue Dec 12 18:58:10 GMT 2000None

GUIClock

public class GUIClock extends Applet implements Sleeper

Fields Summary
private AlarmClock
clock
Constructors Summary
Methods Summary
public voidinit()

        clock = new AlarmClock();
    
public voidpaint(java.awt.Graphics g)

        Date now = new Date();
        g.drawString(now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds(), 5, 10);
    
public voidstart()

        clock.letMeSleepFor(this, ONE_SECOND);
    
public voidwakeUp()

        repaint();
        clock.letMeSleepFor(this, ONE_SECOND);