单项选择题
当Applet程序中的init()方法为下列代码时,运行后用户界面会出现的情况,以下描述正确的是______。
public void init()
{
setLayout(new BorderLayout());
add("North", new TextField(10));
add("Center", new Button("help"));
}
A.文本框将会出现在Applet的顶上,且有10个字符的宽度
B.按钮将会出现在Applet的正中间,且尺寸为正好能够包容help的大小
C.文本框将会出现在Applet的顶上,从最左边一直延伸到最右边;按钮将会出现在Applet的正中间,覆盖除文本框外的所有空间
D.按钮与文本框的布局依赖于Applet的尺寸
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
结构化程序设计所规定的三种基本控制结构是______。
A.输入、处理、输出
B.树形、网形、环形
C.顺序、选择、循环
D.主程序、子程序、函数
点击查看答案&解析
单项选择题
下面的哪些程序段可能导致错误Ⅰ: String s = Gone with the wind ;String t = good ;String k = s + t;Ⅱ: String s = Gone with the wind ;String t;t = s[3] + one ;Ⅲ: String s = Gone with the wind ;String standard = s.toUpperCase();Ⅳ: String s = home directory ;String t = s- directory :
A.Ⅱ、Ⅲ
B.Ⅱ、Ⅳ
C.Ⅰ、Ⅳ
D.Ⅲ、Ⅳ
点击查看答案&解析
相关试题
下列内部类的正确用途是______。Btnn...
为了区分类中重载的同名的不同方法,要求_...
软件生命周期是指______。
在Java中,线程是______。
设执行下面的赋值语句a=Float.valueOf(...