Another way to introduce a thread is to create a thread that uses a run method in another class. This class has to be declared to implement the interface Runnable, which has one method called run. |
This is the correct way to run an animation in an applet, which can show a simulation or other sequence of drawings. |
We have created a template program for an applet with a drawing area for the animation and a layout with room for several control buttons, textfields, etc. |