Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com

Can't draw on the JApplet, we need a JPanel subclass. We've made it an inner class.

Create and set as contentpane.

Each mouseclick, reverse the boolean,....

and paint accordingly.

.