Programming - AWT
You Are Here :: Home > JAVA > AWT - General Questions
19. |
The default layout for a Panel is ___________________
|
A. |
FlowLayout |
B.
|
Grid Layout |
C.
|
Box Layout
|
D.
|
Group Layout
|
|
Answer: Option A
Explanation:
The default layout for a Panel is FlowLayout |
|
20. |
An Applet is a Panel.Therefore, the default layout for a Applet is _____________________
|
A. |
FlowLayout |
B.
|
Grid Layout |
C.
|
Box Layout
|
D.
|
Group Layout
|
|
Answer: Option A
Explanation:
An Applet is a Panel.Therefore, the default layout for a Applet is FlowLayout |
|
21. |
Use add(component); to add to a component when using a ___________________________
|
A. |
FlowLayout |
B.
|
Grid Layout |
C.
|
Box Layout
|
D.
|
Group Layout
|
|
Answer: Option A
Explanation:
Use add(component); to add to a component when using a FlowLayout |
|
22. |
How to Create a Panel?
|
A. |
Panel p = new Panel(); |
B.
|
Panel= new Panel(); |
C.
|
Panel p =Panel();
|
D.
|
Panel p =Panel();
|
|
Answer: Option A
Explanation:
|
23. |
The _______________________ manager divides the container up into a given number of rows and columns
|
A. |
FlowLayout |
B.
|
Grid Layout |
C.
|
Box Layout
|
D.
|
Group Layout
|
|
Answer: Option B
Explanation:
The GridLayout manager divides the container up into a given number of rows and columns |
|
24. |
To associate an action with a component, attach a ______________________ to it
|
A. |
Listeners |
B.
|
Contianers |
C.
|
Frames
|
D.
|
Boxes
|
|
Answer: Option A
Explanation:
To associate an action with a component, attach a listener to it |
|
« prev
next »