/**
* Calculator
* A shareware calculator
*
* @author {@link http://blog.csdn.net/hongweijin Bingbing Li}
*
* @recitation 0101 Matt Carlson
*
* @date 12/7/2005 12:08AM
*
*/
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
public class Calculator extends JFrame implements ActionListener
{
public static final int WIDTH = 800; // width of the window
public static final int HEIGHT = 600; // height of the window
public static final int BUTTON_WIDTH = 80; // width of the buttons
public static final int BUTTON_HEIGHT = 60; // height of the buttons
private CardLayout dealer; // card layout
private JPanel deckPanel; // used to card layout
private JTextField result; // the calculate result
private JCheckBoxMenuItem scientificMode; // the menu item of the mode
private Box vPanel1; // the first line buttons of the