Active Objects
Active objects allow us to create animations by creating new threads
along with the objects, so that the "event" thread can respond to
mouse actions, while the "ActiveObject" continues to execute.
Recall that to create an ActiveObject one must:
- define a class that "extends ActiveObject"
- define its constructor and say "start()" at the
end.
- define a "public void run()" method.
- Include a pause statement inside any while loops in the
run method. This is necessary both to slow the animation and to
allow the processor to take care of other pending tasks.