Question: 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 

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

1 Expert Approved Answer
Step: 1 Unlock

import javaxswing import javaawt import javaawtevent public class Main extends JFrame implements ActionListener private JTextField num1 num2 result pr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!