多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

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.
正确答案:C,D
答案解析:
进入题库查看解析

微信扫一扫手机做题