Calculator

Anonymous
timer Asked: Dec 17th, 2017
account_balance_wallet $15

Question description

please use Eclipse Jee Oxygen and can you combine all the code to word

TOPICS

Graphical User Interfaces (GUI)

DESCRIPTION

Create a GUI (Graphical User Interface) based calculator application that will provide for adding, subtracting, multiplying, or dividing two numbers provided by the user. The application will have two labeled text fields for user to enter two decimal numbers. It will have another labeled non-editable text field for displaying the result. It will have five buttons labeled: Add, Sub, Mult, Div, and Clear. The user will enter the two numbers in the first two text fields and press an operation button such as Add. The application will display the result of performing the required operation in the third field. If the user presses the Clear button, it will clear all the three text fields.

Tutor Answer

lasermaster
School: University of Virginia

Attached.

package myCalc;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;

public class Calc extends JFrame {

public Calc(){

JLabel lab=new JLabel("1stNum");
JTextField jtf=new JTextField(3);
JLabel lab1=new JLabel("2ndNum");
JTextField jtf1=new JTextField(3);
JLabel lab2=new JLabel("Answer");
JTextField jtf2=new JTextField(3);
...

flag Report DMCA
Review

Anonymous
Awesome! Exactly what I wanted.

Similar Questions
Hot Questions
Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors