Re-structured the program so that the framework can call certain methods of the Canvas components, such as repaint().