文件名称:java Calculator 计算器
文件大小:3KB
文件格式:JAVA
更新时间:2013-01-25 15:58:42
java Calculator
import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Calculator extends JFrame { private Container container; private GridBagLayout layout; private GridBagConstraints constraints; private JTextField displayField;//计算结果显示区 private String lastCommand;//保存+,-,*,/,=命令 private double result;//保存计算结果 private boolean start;//判断是否为数字的开始 public Calculator() { super("计算器");