问个问题,请高手帮个忙
请问我这个程序有哪儿错了啊?
我真的找不出来
import java.awt.*;
import java.awt.event.*;
public class J implements ActionListener{
public static void main(String[] a){
Frame f=new Frame("agoiajp");
setSize(500,500);
setVisibel(true);
Panel p=new Panel();
Button b=new Button("hao");
p.add(b);
f.add(p);
b.addActionListener(this);
toolkit=getToolkit();
public void actionPerformed(ActionEvent e)
{if(e.getsource()==b)
{toolkit.beep();
b.setBackground(Color.green);}}
}
}