Problem 1: CountDown Timer

A count down timer counts down to 0 and stops.

Unable to load applet

 

Exercise:

Modify the applet class CountDown in a way that the counter runs in a own thread and is decremented by 1 every second. The decrement must stop when zero is reached.

Hint: The modified CountDown class should implement the Java interface Runnable.

Sources:

CountDown.java, NumberPanel.java

Result:

The result may look like this.