View
 

Lab 8: Color Mixer

Page history last edited by Mr. Kretsch 6 months, 3 weeks ago

Name: __________________

Objective: Message Boxes

Instructions

Getting Started

  1. Create a project called GUI

  2. Import the files from R:\Ap Java\Projects\Lab 8 Color Mixer

Assignment

  1. When the program begins, display a Confirmation box that asks the use whether they want a white or black background. Get the answer and respond accordingly

  2. Create four buttons (circles) on the display. The first three buttons will be associated with red, green, and blue. The fourth button is the color-sample button.

  3. If the user clicks the red, green, or blue button, ask the user for an intensity value for the appropriate color. Display a warning if the user enters an invalid value. If the intensity is valid, change to color of the color-sample button to match the appropriate values

Extra Credit

Remember; get the basic assignment working before you try the extra credit.

  1. Display the intensity values next to the red, green, and blue buttons. Make sure to keep them up-to-date.

Wrap-up

  1. Print a copy of your code.

  2. Turn in your printout and grading sheet.

Grading

 

Points

Extra

Correct

Incorrect

Notes

Background inquiry

4

 

 

 

 

Intensity inquiry

8

 

 

 

 

Intensity validation

2

 

 

 

 

Color sample button

6

 

 

 

 

Button intensity labels

X2

 

 

 

 

Total

20

 

 

 

 

 

Notes:

 

 
 
 
 
 
 
 
 

 

 

Comments (0)

You don't have permission to comment on this page.