- 1
- 0
- 约2.62万字
- 约 13页
- 2020-09-10 发布于天津
- 举报
package two;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
public class calculator implements ActionListener {
int count = 0;
private static int a;
JFrame frame = new JFrame(计算器 );
JTextArea area = new JTextArea();
JTextField fieldshow = new JTextField(0);
JTextField fieldcalculator = new JTextField();
JPanel leftpanel = new JPanel();
JPanel rightpanel = new JPanel();
JPanel buttonpanel = new JPanel();
JPanel motionpanel = new JPanel();
JButton button1 = new JButton(1);
JButton button2 = new JButton(2);
JButton button3 = new JButton(3);
JButton button4 = new JButton(+);
JButton button5 = new JButton(c);
JButton button6 = new JButton(4);
JButton button7 = new JButton(5);
JButton button8 = new JButton(6);
JButton button9 = new JButton(-);
JButton button10 = new JButton(退格);
JButton button11 = new JButton(7);
JButton button12 = new JButton(8);
JButton button13 = new JButton(9);
JButton button14 = new JButton(*);
JButton button15 = new JButton(sin);
JButton button16 = new JButton(0);
JButton button17 = new JButton(+/-);
JButton button18 = new JButton(.);
JButton button19 = new JButton(/);
JButton button20 = new JButton(=);
JButton button21 = new JButton(保存);
JButton button22 = new JButton(复制);
JButton button23 = new JButton(清除 );
StringBuffer S = new StringBuffer();
精选文档
// t 用来记录前一个运算符号是 + - * / =中的哪一个
char t;
// count 用来实现运算符号计数, a 用来识别退格、 正负号操作前一个操作是
否是运算符号 + - * / sin =
// int count = 0, a = 0;
Double x1, x2 = 0d, result;
public static void main(String a[]) {
calculator that = new calculator();
that
您可能关注的文档
最近下载
- (5)Sony PS3 SM-PS3-0093E-02 PLAYSTATION(1)主板参考图纸.pdf VIP
- .AUTOCAD2006安装方法.pdf VIP
- WM-S8-005-1.3 设备物流线通用技术规范.pdf VIP
- 燃气场站事故案例分析总结报告.docx VIP
- 多学科会诊记录.docx VIP
- 1.2 思维形态及其特征 课件-高中政治统编版选择性必修三 逻辑与思维.pptx VIP
- 党员干部个人组织生活会个人对照(学习贯彻党的创新理论方面;加强党性锤炼方面;联系服务职工群众方面;发挥先锋模范作用方面;改作风树新风等方面)存在的问题清单及整改措施.docx VIP
- LED照明节能改造可行性报告三篇 .pdf VIP
- 机器人关节模组结构设计与选型手册.docx VIP
- 桥式起重机安全操作培训.pptx VIP
原创力文档

文档评论(0)