FlowLayout
CardLayout
North and South of BorderLayout
East and West of BorderLayout
GridLayout
第1题:
下列程序用GridLayout布局管理器将Frame分为1行3列,并放入Button构件,横线处应填入的语句是( )。 import java.awt.*; public class Test { public static void main (String[] args) { Frame. frm=new Frame. ("GridLayout"); ____________ frm.add (new Button("Button1")); frm.add (new Button("Button2")); frm.add (new Button("Button3")); frm.setSize (300,300); frm.setVisible (true); } }
A.frm.setLayout (GridLayout (1,3));
B.setLayout (new GridLayout(1,3));
C.frm.setLayout (new GridLayout(3,1));
D.frm.setLayout (new GridLayout(1,3));
第2题:
下列程序采用BorderLayout布局管理,选择正确的语句填入横线处,实现在North区域显示一个名字为“北方”的Button构件。 import java.awt.*; public class ex48 { public static void main(String[] args) { frame. frm = new Frame. ("北方"); frm.setLayout(new BorderLayout()); frm.setSize(200, 200); frm.setVisible(true); } }
A.add("Nouth", new Button("北方"));
B.frm.add("South", new Button("北方"));
C.frm.add("Nouth", new Button("北方"));
D.Frm.add("South", Button("北方"));
第3题:
A.all change height and width
B.Button One change height
C.Button Two change height and Button Three change width
D.Button Four change height and width
第4题:
In the Northern Hemisphere, if the center of a high pressure area is due west of you, what wind direction would you expect?______.
A.South to west
B.South to east
C.North to west
D.North to east
第5题:
The buoy symbol printed on your chart is leaning to the northeast. This indicates ______.
A.you should stay to the north or east of the buoy
B.you should stay to the west or south of the buoy
C.the buoy is a major lighted buoy
D.nothing special for navigational purposes
第6题:
下列程序在Frame中设定BorderLayout布局管理器,选择正确的语句填入程序的横线处。 import java.awt.*; public class ex43 extends Frame { public static void main(String[] args) { ex43 bj = new ex43("BorderLayout"); ______ obj.add("North", new Button("North")); obj.add("South", new Button("Sourth")); obj.add("East", new Button ("East")); obj.add("West", new Button ("West")); obj. add ("Center", new Button ( "Center" ) ); obj.pack(); obj. setVisible (true); } public ex43(String str) { super (str); } }
A.obj.setLayout(new BorderLayout());
B.setLayout(new Borderkayout());
C.setLayout(BorderLayout());
D.obj.setLayout(BorderLayout());
第7题:
下列各种布局管理器中,Frame类的默认布局是()
A. FlowLayout
B. CardLayout
C. BorderLayout
D. GridLayout
第8题:
A.DirectionDirection=EAST;
B.Directiondirection=Direction.WEST;
C.inta-Direction.NORTH;
D.Directiondirection=2;
第9题:
If the center of low pressure is due west of you in the Northern Hemisphere, which wind direction should you expect?
A.South to west
B.South to east
C.West to north
D.North to east
第10题:
Tasmania is an island which lies()of the Australian mainland.