Question: in java run through Eclipse Stage 1: (4 points) Adding buttons to control the size of a paint brush and preview the brush stroke/dot First

in java run through Eclipse

Stage 1: (4 points) Adding buttons to control the size of a paint brush and preview the brush stroke/dot

First, add two buttons to the bottom center of the screen to match the screenshot below. These buttons effectively are to allow us to swap between brushes of different sizes. When pressing the Increase Brush Size button, the brush radius should increase by 10 (up to a maximum of 50), if you press the Decrease Brush Size it should decrease the brush radius by 10 (minimum 10). After completing the next two steps immediately below (the two paragraphs below that start with Second and Third), you will then be able to see the current brush size.

Second, you should print the value on the line that says dot radius: __. See the screenshots (in screenshots folder) for an example with the radius set to 10 (1a) and one with a radius of 30 (1b).

Third, you should modify the code that shows the dot preview (white circle on left column). The starter code always draws this circle with radius 50 as the default. Change the code so that when either button is pressed, the corresponding change is reflected in the dot preview as well.

The dot preview should remain centered at the same location regardless of the radius.

The center should be (DOT_PREVIEW_X, DOT_PREVIEW_Y) which is (60, 200).

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!