public void run () { |
while (true) { |
repaint (); |
try { runner.sleep(1000);
|
} // end while |
} // end run() |
public void paint (Graphics g) { |
Date now = new Date (); |
g.drawString (now.getHours() + ":"+ now.getMinutes() + ":"+now.getSeconds(), 5, 10); |
} |
public void stop () { |
if (runner != null)
|
} |
} // End Digital Clock Applet |