Example: Doodle.java
1. Include “implements” at the header of the class : This application uses MouseListener and MouseMotionListener interfaces
2. Invoke “ methods” to add/activate required listeners. Here we have three:
a) mouse click
b) mouse motion
c) window close
3. Set up board : use paint() and fillRect() methods.