Start the applet and create a thread for the clock to run under. The only thing of note is that we are running the clock display under a thread. In the last lesson we briefly mentioned using a thread. Simply put, a thread is a subprocess running concurrently with a program. By using threads a program can do two or more things at once.
Threads allow multi-tasking to occur.
If we were writing a game program to have enemey spaceships attack your spaceship, then each spaceship could be controlled with its own thread. If we ran the clock display without a thread, we might either lock up the browser or fail to have a smoothly updating clock. This way we can put the thread to 'sleep' for a few milli-seconds to allow the computer time to do other tasks. We then awaken the thread and continue to display the clock. The whole process occurs so quickly that we are not aware it is happening.