Change the RectangleComponent for the mouse listener program in Section 10.10 so that a new rectangle is

Question:

Change the RectangleComponent for the mouse listener program in Section 10.10 so that a new rectangle is added to the component whenever the mouse is clicked. Keep an ArrayList and draw all rectangles in the paintComponent method.

Step by Step Answer:

Related Book For  answer-question
Question Posted: