import java.awt.*;
import java.awt.event.*;public class sss implements ActionListener
{
Button button=new Button("ok");
TextArea text3=new TextArea(" ",10,10);
TextArea text2=new TextArea(" ",10,10);
TextField text=new TextField(10); public static void main(String args[])
{
sss s = new sss();
Frame F=new Frame("lihua");
F.setVisible(true);
F.add(s.button);
F.setSize(100,200);
F.add(s.text3,"East");
F.add(s.text2,"Center") ;
F.add(s.text,"West");
F.pack();
s.button.addActionListener(s);//这行出错
}
public void actionPerformed(ActionEvent e)
{
text.setText("jj");//这行出错
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货