Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions