Enhanced Bouncing Balls Applet
This applet has been enhanced from the original version
in several ways:
- A Restart button has been added. It just tells the applet to call the canvas's initialize() method.
- There are balls of several different colors. To do this, a ballColor array is used in the
BBCanvas class, in place of a single ballColor variable.
- If you click the mouse, or click and drag the mouse, all the balls will head towards the
mouse's position.
You can do similar things for extra credit if you want. The last one is pretty hard,
unless you know something about "vector arithmetic."