This program allows the user to place balls on the canvas using the mouse. On exiting the window, a simulation of a "chain reaction" begins: the most recently drawn ball hits into the second most recently drawn, which hits into the next ball, and so on. This program demonstrates the use of a recursive list which keeps track of the balls.

Note: This demo requires a Java enabled browser. If you see this message then your browser either doesn't support Java or has had Java disabled.

Click below to download the source files for ChainReaction.