netbeans 中找不到符号问题
import java.awt.*;import java.awt.Event.*;
public class QQTest extends Frame implements ActionListener {
public Label L1;
public Label L2;
public Label L3;
public Label L4;
public Label L5;
public TextField T1;
public TextField T2;
public Button B1;
public Button B2;
public Checkbox C1;
public Checkbox C2;
public Frame f1;
public Panel p1;
public Panel p2;
public Panel p3;
public Panel p4;
public QQTest() {
L1=new Label("账号");
L2=new Label("注册新账号");
L3=new Label("密码");
L4=new Label("取回密码");
L5=new Label("状态");
B1=new Button("设置");
B2=new Button("登录");
C1=new Checkbox("记住密码");
C2=new Checkbox("自动登录");
f1=new Frame("QQ2009");
T1=new TextField();
T2=new TextField();
}
public void QQLanch()
{
f1.setLayout(new GridLayout(4,1));
p1=new Panel();
p2=new Panel();
p3=new Panel();
p4=new Panel();
p1.add(L1);
p1.add(T1);
p1.add(L2);
p2.add(L3);
p2.add(T2);
p2.add(L4);
p3.add(L5);
p3.add(C1);
p3.add(C2);
p4.add(B1);
p4.add(B2);
f1.add(p1);
f1.add(p2);
f1.add(p3);
f1.add(p4);
f1.pack();
f1.setVisible(true);
}
public static void main(String[] args)
{
QQTest QQ1=new QQTest();
QQ1.QQLanch();
}
}
Compiling 1 source file to E:\java application\QQTest\build\classes
E:\java application\QQTest\src\QQTest.java:3: 找不到符号
符号: 类 ActionListener
public class QQTest extends Frame implements ActionListener {
1 错误
环境变量设置是对的。。