更多"下列代码的功能是把按钮save添加到窗口myFrame的中间,在空白处"的相关试题:
[填空题]
下列代码的功能是把按钮save添加到窗口myFrame的中间,在空白处应填入的代码是()。
public class MyFrame
public static void main(String[] args)
JFrame myFrame=new JFrame( );
JButton save=new JButton( );
myFrame.getContentPane( ).add(save,"______");
myFrame.setSize(200, 200);
myFrame.setVisible(true);
[填空题]下列代码的功能是把按钮save添加到窗口myFrame的中间,在空白处应填入的代码是________。
public class MyFrame {
public static void main(String[] args) {
JFrame myFrame = new JFrame( );
JButton save = new JButton( );
myFrame.getContentPane( ).add(save,"________");
myFrame.setSize(200, 200);
myFrame.setVisible(true);
}
}
[填空题]下列代码的功能是把按钮save添加到窗口myFrame的中间,在空白处填入的代码是______。
import javax.swing.*;
public class MyFrame
public static void rain(String args口)
JFrame myFrame=new JFrame( );
JButton save-new JButton("Save");
myFrame.getContentPane( ).add(save,"______");
myFrame.setSize(200,200);
myFrame.setVisible(troe);
[单项选择]
下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()
public class FindKeyWords{
public static void main(sring[] args){
sting text=
“ An array is a data structur that stores a collection of”
+ “values of the same type . You access each individual value”
+ “through an integer index . For example,if a is an array”
+ “of inergers, then a[i] is the ith integer in the array.”;
Int arrayCount =0;
Int idex = -1;
Sting arrarStr =”array”;
Index = text.indexof(arrayStr);
While(index 0) {
++arrayCount;
Index += arrayStr.length( );
Index = text.indexof(arrayStr,index);
}
System.out.println
(“the text contains” + arrayCount + “arrays”);
}
}
A. <
B. =
C. <=
D. >=
[单项选择]下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是( )。
public class FindKeyWords
public static void main(sring[]args)
sting text=
"An array is a data structur that stores a collection of"
+"values of the same type. You access each individual value"
+"through an integer index. For example,if a is an array"
+"of inergers,then a[i]is the ith integer in the array.";
Int arrayCount=0;
Int idex=-1;
Sting arrarStr="array";
Index=text.indexof(arravStr);
While(index______0)
++arrayCount;
Index+=arrayStr.length( );
Index=text.indexof(arrayStr,index);
System.out.println
("the text contains"+arrayCount+"arrays");
A. <
B. =
C. <=
D. >=
[单项选择]已知形成链表的存储结构如下图所示,则下述类型描述中的空白处应填______。
struct link
char data;
______;
node;
A. Struct link next
B. link*next
C. struct next link
D. Struct link*next
[单项选择]已知形成链表的存储结构如下图所示,则下述类型描述中的空白处应填______。
struct link
char data;
______,
node;
A) struct link next B) link *next
C) stuct next link D) struct link *next
[填空题]在窗体上画两个文本框和一个命令按钮,然后在命令按钮的代码窗口中编写如下事件过程:
Private Sub Commandl_Click( )
Text1="VB programming"
Text2=Text1
Text1="ABCD"
End Sub
程序运行后,单击命令按钮,文本框Text2中显示的内容为 【12】 。
[填空题]在窗体上画两个文本框和一个命令按钮,然后在命令按钮的代码窗口中编写如下事件过程:
Private Sub Command1_ Click( )
Text1="VB programming"
Text2=Text1
Text1="ABCD"
End Sub
程序运行后,单击命令按钮,文本框Text2中显示的内容为______。
[多项选择]窗口的控制按钮和改变窗口尺寸按钮包括( )。
A. 控制按钮
B. 关闭按钮
C. 最小化按钮
D. 最大化(还原)按钮
[填空题]在窗体上画两个文本框和一个命令按钮,然后在代码窗口中编写如下事件过程:
Private Sub Command1_Click( )
Text1. Text="VB Programming"
Text2. Text=Text1. Text
Text1. Text="ABCD"
End Sub
程序运行后,单击命令按钮,两个文本框中显示的内容分别为 【7】 和 【8】 。