Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions