Welcome

Anti Essays offers essay examples to help students with their essay writing.

Sign Up

Java Calcu Essay

Open Document

Below is an essay on "Java Calcu" from Anti Essays, your source for research papers, essays, and term paper examples.

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.KeyStroke;

public class Calculator extends JFrame implements ActionListener{

final int MAX_INPUT_LENGTH = 20;
final int INPUT_MODE = 0;
final int RESULT_MODE = 1;
final int ERROR_MODE = 2;
int displayMode;

boolean clearOnNextDigit, percent;
double lastNumber;
String lastOperator;

private JMenu jmenuFile, jmenuHelp;
private JMenuItem jmenuitemExit, jmenuitemAbout;

private JLabel jlbOutput;
private JButton jbnButtons[];
private JPanel jplMaster, jplBackSpace, jplControl;


  Font(String name, int style, int size)
      Creates a new Font from the specified name, style and point size


Font f12 = new Font("Times New Roman", 0, 12);
Font f121 = new Font("Times New Roman", 1, 12);


public Calculator()
{


jmenuFile = new JMenu("File");
jmenuFile.setFont(f121);
jmenuFile.setMnemonic(KeyEvent.VK_F);

jmenuitemExit = new JMenuItem("Exit");
jmenuitemExit.setFont(f12);
jmenuitemExit.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_X,
ActionEvent.CTRL_MASK));
jmenuFile.add(jmenuitemExit);

jmenuHelp = new JMenu("Help");
jmenuHelp.setFont(f121);
jmenuHelp.setMnemonic(KeyEvent.VK_H);

jmenuitemAbout = new JMenuItem("About Calculator");
jmenuitemAbout.setFont(f12);
jmenuHelp.add(jmenuitemAbout);

JMenuBar mb...

Show More


Citations

MLA Citation

"Java Calcu". Anti Essays. 12 Dec. 2018

<http://teachingsail.com/free-essays/Java-Calcu-584552.html>

APA Citation

Java Calcu. Anti Essays. Retrieved December 12, 2018, from the World Wide Web: http://teachingsail.com/free-essays/Java-Calcu-584552.html


FL Studio Mobile image-line Music | Download | Pro Evolution Soccer 2015 Update v1.03-RELOADED