um2.addActionListener(this);
num3=new JButton("3");
num3.setBackground(Color.white);
num3.setForeground(new Color(0,0,225));
num3.addActionListener(this);
num4=new JButton("4");
num4.setBackground(Color.white);
num4.setForeground(new Color(0,0,225));
num4.addActionListener(this);
num5=new JButton("5");
num5.setBackground(Color.white);
num5.setForeground(new Color(0,0,225));
num5.addActionListener(this);
num6=new JButton("6");
num6.setBackground(Color.white);
num6.setForeground(new Color(0,0,225));
num6.addActionListener(this);
num7=new JButton("7");
num7.setBackground(Color.white);
num7.setForeground(new Color(0,0,225));
num7.addActionListener(this);
num8=new JButton("8");
num8.setBackground(Color.white);
num8.setForeground(new Color(0,0,225));
num8.addActionListener(this);
num9=new JButton("9");
num9.setBackground(Color.white);
num9.setForeground(new Color(0,0,225));
num9.addActionListener(this);
point.addActionListener(this);
point.setBackground(Color.white);
negative.addActionListener(this);
negative.setBackground(Color.white);
centerPanel.add(num7);
centerPanel.add(num8);
centerPanel.add(num9);
centerPanel.add(num4);
centerPanel.add(num5);
centerPanel.add(num6);
centerPanel.add(num1);
centerPanel.add(num2);
centerPanel.add(num3);
centerPanel.add(num0);
centerPanel.add(negative);
centerPanel.add(point);
divide.setForeground(new Color(255,0,0));
divide.setBackground(Color.white);
divide.setFont(new Font("宋体",Font.BOLD,22));
divide.addActionListener(this);
root.setForeground(new Color(0,0,225));
root.setBackground(Color.white);
root.setFont(new Font("宋体",Font.BOLD,15));
root.addActionListener(this);
multiply.setForeground(new Color(255,0,0));
multiply.setBackground(Color.white);
multiply.setFont(new Font("宋体",Font.BOLD,22));
multiply.addActionListener(this);
qiuyu.setForeground(new Color(0,0,225));
qiuyu.setBackground(Color.white);
qiuyu.setFont(new Font("宋体",Font.BOLD,22));
qiuyu.addActionListener(this);
subtract.setForeground(new Color(255,0,0));
subtract.setBackground(Color.white);
subtract.setFont(new Font("宋体",Font.BOLD,22));
subtract.addActionListener(this);
reciprocal.setForeground(new Color(0,0,225));
reciprocal.setBackground(Color.white);
reciprocal.setFont(new Font("宋体",Font.BOLD,15));
reciprocal.addActionListener(this);
plus.setForeground(new
Color(255,0,0));
plus.setBackground(Color.white);
plus.setFont(new Font("宋体",Font.BOLD,22));
plus.addActionListener(this);
result.setForeground(new Color(255,0,0));
result.setBackground(Color.white);
result.setFont(new Font("宋体",Font.BOLD,22));
result.addActionListener(this);
eastPanel.add(divide);
eastPanel.add(root);
eastPanel.add(multiply);
eastPanel.add(qiuyu);
eastPanel.add(subtract);
eastPanel.add(reciprocal);
eastPanel.add(plus);
eastPanel.add(result);
mc=new JButton("MC");
mc.setForeground(new Color(255,0,0));
mc.setBackground(Color.white);
mr=new JButton("MR");
mr.setForeground(new Color(255,0,0));
mr.setBackground(Color.white);
ms=new JButton("MS");
ms.setForeground(new Color(255,0,0));
ms.setBackgr