单项选择题
当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.Ⅲ、Ⅳ
点击查看答案&解析
相关试题
______语句的功能是从当前方法中退出...
函数min()的功能是:在带头结点的单链表...
下列JApplet使用重写paintCompon6t()方...
______类是提供线程操作和管理的类。
请在下画线中填写适当内容:abstract clas...