Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The output should have a top section with three text boxes that display the color of the individual color panel. Each text box color value

The output should have a top section with three text boxes that display the color of the individual color panel. Each text box color value should be controlled by two buttons that can increase or decrease the value.

The output should have a bottom section that displays the RGB color specified by the values in the upper panels text boxes.

Create a class named App1 which provides a GUI window. Users will enter 24-bit RGB color values and the window will then display them. The application should meet the specifications below:

1) The window will contain an upper panel that holds three text boxes (JTextFields); each text box will have two associated buttons (JButtons).

a) The text boxes will be for red (R), green (G), and blue (B) and should be labeled

b) The values should be initialized to zero for all three text boxes

c) Users can enter values into the text boxes

d) For each text box, one button should allow incrementing and another should allow decrementing the present value, and should be labeled appropriately

e) Any color changes caused by clicking buttons should immediately be shown in the text boxes.

2) The window will contain a lower panel that displays, as its background, the RGB color specified by the values in the upper panels text boxes.

a) Initially the RGB value will be zero

b) Whenever any of the values in the top panels text boxes change, the lower panels background color will immediately update to match it.

3) No error checking is required (i.e., you can assume users will only enter integers), however:

a) Entering a number outside the range 0 to 255 will be treated as entering a zero

b) Clicking a decrement button when the value is zero will have no effect (no drop to -1)

c) Clicking an increment button when the value is 255 will have no effect (no rise to 256)

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions

Question

Consistently develop management talent.

Answered: 1 week ago

Question

Create a refreshed and common vision and values across Europe.

Answered: 1 week ago

Question

Provide the best employee relations environment.

Answered: 1 week ago