import Java.awt.*;
import Java.awt.event.*;
public class A5i13 extends Frame implements ActionListener{
private Label Labelshow1=new Label("计算区:");
private Label Labelshow2=new Label("结果区:");
private Label Labelsay=new Label("状态: ");
private Label Labelnow=new Label("欢迎使用我,艾全通为你带来的科学计算器");
private Label Labeltime=new Label("功能暂未设置"); //便于本程序添加其它的功能
private Label result=new Label("");
private TextField Textshow = new TextField(40);
private Panel pan1=new Panel();
private Panel pan2=new Panel();
private Panel pan3=new Panel();
private Panel pan4=new Panel();
private Panel pan5=new Panel();
private Button button1=new Button("1");
private Button button2=new Button("2");
private Button button3=new Button("3");
private Button button4=new Button("4");
private Button button5=new Button("5");
private Button button6=new Button("6");
private Button button7=new Button("7");
private Button button8=new Button("8");
private Button button9=new Button("9");
private Button button10=new Button("0");
private Button button11=new Button("+");
private Button button12=new Button("-");
private Button button13=new Button("×");
private Button button14=new Button("÷");
private Button button15=new Button("%");
private Button button16=new Button("(");
private Button button17=new Button(")");
private Button button18=new Button("清零");
private Button button19=new Button(".");
private Button button20=new Button("=");
private Font wordFont1 =new Font("TimesRoman",Font.BOLD,15);
private Font wordFont2 =new Font("TimesRoman",Font.BOLD,28);
public A5i13()
{ // 采用构造方法来设置监听和初始化布局
super("我的科学计算器");
setup();
button1.addActionListener(this);
button2.addActionListener(this);
button3.addActionListener(this);
button4.addActionListener(this);
button5.addActionListener(this);
button6.addActionListener(this);
button7.addActionListener(this);
button8.addActionListener(this);
button9.addActionListener(this);
button10.addActionListener(this);
button11.addActionListener(this);
button12.addActionListener(this);
button13.addActionListener(this);
button14.addActionListener(this);
button15.addActionListener(this);
button16.addActionListener(this);
button17.addActionListener(this);
button18.addActionListener(this);