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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started