Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design a window interface with a frame that has any light shade as background color (5 points). It should have three text fields (15
Design a window interface with a frame that has any light shade as background color (5 points). It should have three text fields (15 points), four radio buttons (20 points), and a label (for the equality sign, 5 points) as follows. * 01 Add a title "Basic Calculator", center it and give it any color (5 points). Write a program such that if the user enters two integers on the text fields and click on any radio buttons the result of the operations appears in the third text field (10 points). The result of division is usually a non-integer, and it should be handled correctly (10 points). Show the use of try-catch block (10 points). You must handle the following situations and show a message dialogue box with appropriate message (10 points): 1)Non integer inputs on one or both text fields. 2) No input in one or both text fields. 3) Division by zero. Do not use JavaScript in your solution. Note that, there is no command button on this interface. Name your class as Main. Hint: Test your program to show correct results, especially for divisions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
import javaxswing import javaawt import javaawtevent public class Main extends JFrame implements ActionListener private JTextField num1 num2 result pr...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started