程序调不出了,怎么办?
import java.awt.*;import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import javas.swing.border.*;
class MyButton extends Button implements ActionListener
{
MyButton()
{
TextField tf1=new TextField();
TextField tf2=new TextField();
TextField tf3=new TextField();
add(tf1);
Box box1;
box1=Box.createVericalBox();
Button b1=new Button("+");
Button b2=new Button("-");
Button b3=new Button("*");
Button b4=new Button("/");
box1.add(b1);
box1.add(b2);
box1.add(b3);
box1.add(b4);
add(box1);
add(tf2);
add(tf3);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
int a=Integer.parseInt(tf1.getText());
int b=Integer.parseInt(tf2.getText());
if(e.getSource()==b1)
{
tf3.setText(a+b);
}
else if(e.getSource()==b2)
{
tf3.setText(a-b);
}
else if(e.getSource()==b3)
{
tf3.setText(a*b);
}
else uf(e.getSource==b4)
{
tf3.setText(a/b);
}
}
}
class aextends Applet
{
MyButton b;
public void init()
{
b=new MyButton();
}
}