想给FileDialog添加一个文本TextField
class text1 extends FileDialog { public text1() {
super(new Frame());
TextField text1=new TextField();
//add(text1);
System.out.println(getLayout());
setVisible(true);
}
public static void main (String[] args) {
new text1();
}
}
class text1 extends FileDialog { public text1() {
super(new Frame());
TextField text1=new TextField();
//add(text1);
System.out.println(getLayout());
setVisible(true);
}
public static void main (String[] args) {
new text1();
}
}
解决方案 »
- 用iexpress.exe把ocx生成了cab文件,但是如何查看CLASSID 控件的 CLSID ?
- java文件在unix下与windows下编译有哪些不同之处?我们需要注意哪些东西?
- 初学JAVA新手求教问题。
- 如何做到类似qq发信息,当按了JButton后,将TextArea的文本发送后,光标仍停留在TextArea,而不会失去焦点
- 数组降序的问题..
- 哪位大虾能解释清楚PrintWriter和PrintStream的区别?
- 一个很简单的问题可我不懂,请老师帮看看。
- 新年好
- 怎样在Canvas上画图....(UP者有分喽!!!!)
- HashCode的问题
- 请问如何自定义自己的对话框
- Help!高手们进来帮帮小菜鸟啊!
加多了add(text1);后,编译通过,但是不能运行,应该怎么给给FileDialog添加一个文本TextField ,谢谢