Question: Circle (Game: eye-hand coordination) Here is the solution to Exercise 15.19 at the end of Chapter 15 This program displays a circle of radius 10

Circle (Game: eye-hand coordination) Here is the solution to Exercise 15.19 at the end of Chapter 15

This program displays a circle of radius 10 pixels filled with a random color at a random location on a pane. When you click on the circle, it disappears and a new random-color circle is displayed at another random location. After 20 clicks, the time is displayed in the pane.

Modify this game so that the radius of the circle is 20. Change the way the events are handled so that when you click anywhere in the plane, the circle with the new random color appears in the new location. IT SHOULD APPEAR WHERE YOU CLICKED! - I received some submissions where this was not the case. (Hint: Replace circle mouse click event with a pane mouse click event). After 20 clicks, the time should be displayed in the pane and no more mouse click events are accepted.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!