欢迎来到计算机考试题库网 考试题库官网
全部科目 > Java认证考试 > SCJP程序员认证考试

多项选择题

import java.awt*;  
public class X extends Frame (  
public static void main(string args) ( 
X x = new X ();  
X.pack();  
x.setVisible(true); 
) 
public X () (  
setlayout (new GridLayout (2,2));  
Panel p1 = new panel();  
 Add(p1);  
 Button b1= new Button (“One”);  
 P1.add(b1); 
 Panel p2 = new panel();  
 Add(p2);  
Button b2= new Button (“Two”);  
 P2.add(b2);  
 Button b3= new Button (“Three”); 
 add(b3);  
Button b4= new Button (“Four”);  
add(b4);  
)  
)  
Which two statements are true? ()

    A. All the buttons change height if the frame height is resized.
    B. All the buttons change width if the Frame width is resized.
    C. The size of the button labeled “One” is constant even if the Frame is resized.
    D. Both width and height of the button labeled “Three” might change if the Frame is resized.

点击查看答案

相关考题