Question: In Java, complete the following Step 1. Design a static screen drawing using RGB colors and 5 circles. The diameters of the 5 circles are

In Java, complete the following

Step 1. Design a static screen drawing using RGB colors and 5 circles. The diameters of the 5 circles are 20, 40, 60, 80, and 100 pixels. You need to use a for loop to draw the 5 circles in a row from the smallest to the largest. The centers of the 5 circles need to be evenly distributed horizontally. The distance between two adjacent circles needs to be at least 100 pixels. The window size needs to be 600 x 600.

Step 2. Make the static screen drawing dynamic by having it interact with the mouse. This includes the following:

The circles need to follow the mouse.

The circles need to change their color according to the mouse.

Step 3. Add more dynamic features:

When any key is pressed, your name and the date when the homework is done should be displayed in the console window.

The background color should switch between black and white as the mouse is clicked. The background color should stay the same until the next time when the mouse is clicked. (Hint: you need to use a global boolean variable to control it.)

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 Databases Questions!