Example of mouse events painting rectangles utilizing Java