Design a window interface with a frame that has any light shade as background color (5...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
import javaxswing import javaawt import javaawtevent public class Main extends JFrame implements ActionListener private JTextField num1 num2 result pr... View the full answer
Related Book For
Systems Analysis And Design
ISBN: 978-1119496489
7th Edition
Authors: Alan Dennis, Barbara Wixom, Roberta M. Roth
Posted Date:
Students also viewed these programming questions
-
Consider the following game tree, with max at the root node: A D MAX B MIN F E MAX -1 Apply a- pruning algorithm on the tree and select on which nodes the algorithm will perform pruning.
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
During the year 100,000 parts were handled 80,000 for regular stroller and 20,000 for jogging strollers 20,000 firmness tests were conducted 13,000 for regular stroller and 7,000 for jogging and...
-
The tank-pipe system of Fig P6.49 is to deliver at least 11 m3/h of water at 20C to the reservoir. What is the maximum roughness height allowable for the pipe?
-
Entity C, a service business, started operations in 20x1. The following were the transactions during the year: 1. The owner provided an initial capital of P2,000,000 to the business. 2. The business...
-
An engine works on dual combustion cycle, the compression ratio being 11 . The pressure at the commencement of combustion is 1 bar and the temperature is 90C. The maximum pressure in the cycle is 50...
-
As the accountant for Veneskey & Sons, you have been hired to prepare the payroll and everything that goes along with it for OlFashion Industries which has 4 employees. Their necessary payroll...
-
A strategy has a monthly total return of 0.0025 (0.25%) and a monthly standard deviation of total returns of 0.0040 (0.40% ). The risk free rate is 2% and the market risk premium is 4%, both per...
-
Determine the magnitude of the resultant force F R = F 1 + F 2 and its orientation , measured counterclockwise from the positive x axis. F = 260 lb 45 F=310 lb 12 5 13 y X
-
Assume the following information regarding company INDMACH that manufactures industrial machinery (consider each case independently): 1. INDMACH is being sued for 1,000,000 by its customers for...
-
12. What is the output of the code given below? int main() { for (int i = 0; i < 3; ++i) { } printf("%d", i); printf("%d", i); return 0; }
-
The U.S. Central Intelligence Agency maintains an online World Factbook that is a convenient source of a wide variety of geographic, social, and economic information. You may look up information by...
-
In addition to making changes to capital adequacy ratios, BASEL III also implemented new liquidity regulations on FIs for the first time. What was Australia's initial solution to meeting the...
-
Read first: ABC Enterprises is a newly established car dealership in town. The company has several sales representatives whose weekly compensations are commission-based. That is, sale...
-
There are three different types of cost allocation methods: the direct method, the step down method, and the reciprocal method. Give a brief explanation of the three cost allocation methods and...
-
Use Stokes' theorem to evaluate the line integral F. dr. In each case C is oriented counterclockwise as viewed from above. (a) F(x, y, z)=zi+yj+zyk, C is the triangle with vertices (1,0,0), (0, 1,0),...
-
The senior management at Davis Watercraft would like to determine if it is possible to improve firm profitability by changing their existing product mix. Currently, the product mix is determined by...
-
Draw a level 0 data flow diagram (DFD) for the Picnics R Us system in Exercise H, Chapter 4.
-
Create a structure chart based on the data flow diagrams (DFDs) that you created for the following exercises in Chapter 5: Question D Question E Question F Question G Question H
-
Mark Van Dorn, president of Van Dorn Sub-Oceanic Exploration, Inc., has authorized his Director of Information Services to begin a major project that will redesign the engineering support...
-
What are the different methods of conducting marketing research?
-
What is the main difference between a full-service and a limited-service supplier?
-
What are some of the issues that should be considered when conducting marketing research?
Study smarter with the SolutionInn App