Question: Write a program that displays a circle of radius 10 pixels filled with a random color at a random location on a pane, as shown

Write a program that displays a circle of radius 10 pixels filled with a random color at a random location on a pane, as shown in Figure 15.31b. When you click the circle, it disappears and a new random-color circle is displayed at another random location. After 20 circles are clicked, display the time spent in the pane, as shown in Figure 15.31c.

O O Exercise15_19 Exercise15_19 Time spent is 58215 milliseconds (b) (c)

O O Exercise15_19 Exercise15_19 Time spent is 58215 milliseconds (b) (c)

Step by Step Solution

3.35 Rating (182 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javafxapplicationApplication import javafxsceneScene import javafxscenelayoutPane import javafxscenepaintColor import javafxsceneshapeCircle import javafxscenetextText import javafxstageStage p... View full answer

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 Introduction to Java Programming and Data Structure Questions!