Example: Clock Applet
// Clock.java Steve Tanimoto
import java.awt.*;
import java.applet.*;
import java.util.*;
public class Clock extends Applet
implements Runnable {
class TimeThread extends Thread {
boolean timeToQuit = false;
public TimeThread(Runnable r) { super(r); }
}
TimeThread timeThread;
public Clock() { }
public void init() {
timeThread = new TimeThread(this);
timeThread.start();
}
Previous slide
Next slide
Back to first slide
View graphic version