![]() |
Faster version of the simple animation applet. Here we break the rule that says all drawing must be done from the paint() routine. Instead, all the paint() routine does is save a copy of the graphics context that it was passed. The thread loop uses this saved object to draw directly. As a result, the animation runs much faster.