Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Package Name: hmwk12 Source File Name: (Submit zip of these) CalcFrame.java CalcGUI.java (includes main()) Test Files: No Test Files Write a GUI that allows the

Package Name:

hmwk12

Source File Name:

(Submit zip of these)

CalcFrame.java

CalcGUI.java (includes main())

Test Files:

No Test Files

Write a GUI that allows the user to:

Choose a text (foreground) color for the answer

3 radio buttons for red, green, blue

Choose the first and second number from a list (choices are 1 through 5)

Make sure only 1 list item can be selected at a time

Choose an operator (choices are +, -, *, and /) from a combo box

Click on a button to calculate the answer

Answer is shown in a label next to the = button

image text in transcribed

For example, if user chooses red, 2, *, 4, and clicks on =, then following will be shown:

image text in transcribed

Requirements:

Use a layout manager so the 3 radio buttons are in one panel and the rest of the controls are in a different panel. I used a BorderLayout and put the radio buttons the NORTH section and the rest in the CENTER section

You can set a JLabels text color with the setForeground method

Default the choices to red, 1, +, and 1

You should only need one event handler just the one for the = button

Extra Notes:

Did you correctly name the package/folder?

Did you correctly name the class/file?

Did you include comments?

12345 e 12345

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

Ehs 2.0 Revolutionizing The Future Of Safety With Digital Technology

Authors: Tony Mudd

1st Edition

B0CN69B3HW, 979-8867463663

More Books

Students also viewed these Databases questions