java 编程,密码检验问题,帮忙看看代码和错误,谢谢啦
import java.awt.*; import java.awt.event.TextEvent; import java.awt.event.TextListener; import javax.swing.JFrame; public class CheckInput { private JFrame frame; private TextField tf1; private JFrame f=new JFrame("窗口将会在5秒后消失"); public CheckInput(){ frame=new JFrame("登录界面"); frame.setSize(300, 200); frame.setVisible(true); tf1=new TextField(); tf1.setBounds(220, 165, 100, 20); frame.add(tf1); tf1.addTextListener(new ValueChange()); } class ValueChange implements TextListener{ public void textValueChanged(TextEvent e) { // TODO Auto-generated method stub th1 t=new th1(); t.start(); } } class th1 extends Thread{ public void run(){ System.out.println(tf1.getText()); if(!"abc".equals(tf1.getText())){ f.setVisible(true); f.setSize(300, 300); f.add(new Label("密码输入不正确")); try { Thread.sleep(3600); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } f.setVisible(false); } } } public static void main(String[]args){ CheckInput ci=new CheckInput(); } }