Question: Modify MouseDemo2 class into ConcentricCircles class. When executed, your class should open a window (frame) on the screen. Each time when a mouse is clicked
Modify MouseDemo2 class into ConcentricCircles class. When executed, your class should open a window (frame) on the screen. Each time when a mouse is clicked anywhere on the screen, your program should draw several concentric circles around the point where the mouse is clicked. Do not fill the circles. Circles are called concentric if they have the same center, but different radii (radiuses). The number of concentric circles drawn each time should be the same as the number of mouse clicks so far. That is, on the first click you draw just one circle, on the second click you draw two concentric circles, on the third click you draw three concentric circles, etc. You can draw the circles using any color you choose, but it should not be black.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
