[求助]TextField的实现问题
import java.awt.*;class WindowText extends Frame
{
TextField text1,text2;
WindowText(String s)
{
super(s);
setLayout(new FlowLayout());
text1=new TextField("输入密码: ",10);
text1.setEditable(false);
text2=new TextField(10);
text2.setEchoChar('*');
add(text1);
add(text2);
setBounds(0,0,250,300);
setVisible(true);
validate();
}
}
public class TextField{
public static void main(String args[])
{
WindowText text=new WindowText("添加了文本框的窗口");
}
}
请问各位大侠,为什么运行不了啊???