You are on page 1of 1

BallDemo - a demonstration of graphical output on a Canvas class.

This project is part of the material for the book


Objects First with Java - A Practical Introduction using BlueJ
Fourth edition
David J. Barnes and Michael Kolling
Pearson Education, 2008
This project is discussed in chapter 5.
This project provides two short graphical demos in the BallDemo class.
One just performs various graphic operation (drawing text, lines and a
shape), the other displays two bouncing balls.
This project provides great scope for extension. The Canvas class does
not usually need to be changed. It may be best to treat it as a library
class (open the editor and switch to "interface" view).
Other classes can be changed or added. The book contains suggestions
for various exercises.

You might also like