当前位置:SCJP程序员认证考试题库

问题:

[多选]

Given the following code, which code fragments, when inserted at the indicated location, will succeed in making the program display a button spanning the whole window area?()  
import java.awt.*; 
 public class Q1e65 {  
public static void main(String args[]) {  
Window win = new Frame();  
Button but = new Button("button");  
// insert code fragment here  win.setSize(200, 200); 
 win.setVisible(true); 
 }  
}  

A . win.setLayout(new BorderLayout()); win.add(but);
B . win.setLayout(new GridLayout(1, 1)); win.add(but);
C . win.setLayout(new BorderLayout()); win.add(but, BorderLayout.CENTER);
D . win.add(but);
E . win.setLayout(new FlowLayout()); win.add(but);

儿童社会性教育的主题可从哪些方面进行设计? 敦煌莫高窟壁画中有很多宫人形象用的眉式,是被称为“月眉”的画眉方式,月眉的叫法起源于() 南宋。 北宋。 唐代。 汉代。 根据我国相关规定,向个人发放消费贷款的余额不得超过借款人月收入的4倍。 专业技术人员职业幸福感三大策略() 学习型组织的人才培训战略提升职业幸福。 以人为本的人才开发战略培养职业幸福。 创新科学的人才管理方式增强职业幸福。 传承的人才管理方式增强职业幸福。 个人通知储蓄是指在存入款项时不约定存期,支取时事先通知银行,约定支取存款日期和金额的一种个人存款方式。

Given the following code, which code fragments, when inserted at the indicated location, will succeed in making the program display a button spanning the whole window area?()  
import java.awt.*; 
 public class Q1e65 {  
public static void main(String args[]) {  
Window win = new Frame();  
Button but = new Button("button");  
// insert code fragment here  win.setSize(200, 200); 
 win.setVisible(true); 
 }  
}  

参考答案:

  参考解析

本题暂无解析

在线 客服