Programming - AWT
You Are Here :: Home > JAVA > AWT - General Questions
13. |
How to Create a TextField?
|
A. |
TextField txt = new TextField ("Initial text.", 20); |
B.
|
TextField= new TextField ("Initial text.", 20); |
C.
|
TextField txt =TextField ("Initial text.", 20);
|
D.
|
TextField txt = new("Initial text.", 20);
|
|
Answer: Option A
Explanation:
TextField txt = new TextField ("Initial text.", 20); |
|
14. |
How to Create a Scroolbar?
|
A. |
Scrollbar scrolly = new Scrollbar(Scrollbar.HORIZONTAL, initialValue,bubbleSize, minValue, maxValue); |
B.
|
Scrollbar= new Scrollbar(Scrollbar.HORIZONTAL, initialValue,bubbleSize, minValue, maxValue); |
C.
|
Scrollbar scrolly = new(Scrollbar.HORIZONTAL, initialValue,bubbleSize, minValue, maxValue);
|
D.
|
Scrollbar scrolly = Scrollbar(Scrollbar.HORIZONTAL, initialValue,bubbleSize, minValue, maxValue);
|
|
Answer: Option A
Explanation:
Scrollbar scrolly = new Scrollbar(Scrollbar.HORIZONTAL, initialValue,bubbleSize, minValue, maxValue); |
|
15. |
When you create an _________________, you get a Panel “for free”
|
A. |
Swing |
B.
|
Applets |
C.
|
Servlets
|
D.
|
AWT
|
|
Answer: Option B
Explanation:
When you create an Applet, you get a Panel “for free” |
|
16. |
When you write a GUI for an application, you need to create and use a __________________
|
A. |
Panel |
B.
|
Window |
C.
|
Frame
|
D.
|
Button
|
|
Answer: Option C
Explanation:
When you write a GUI for an application, you need to create and use a Frame |
|
17. |
How to Create a Frame?
|
A. |
Frame frame = new Frame(); |
B.
|
Frame= new Frame(); |
C.
|
Frame frame =Frame();
|
D.
|
Frame frame = Frame();
|
|
Answer: Option A
Explanation:
Frame frame = new Frame(); |
|
18. |
Every Container has a __________________ manager
|
A. |
Layout |
B.
|
Grid Layout |
C.
|
Box Layout
|
D.
|
Group Layout
|
|
Answer: Option A
Explanation:
Every Container has a layout manager |
|
« prev
next »