This simple applet illustrates the event processing and using of threads in JDK 1.1.
You should run some Java-enabled browser to see the applet...
The source code of the "TrafficLights" applet.