Programming - Swings
You Are Here :: Home > JAVA > Swings - General Questions
13. |
The __________ is used to create a button that have platform-independent implementation.
|
A. |
Jbutton class |
B.
|
button() |
C.
|
button class
|
D.
|
Jbutton()
|
|
Answer: Option A
Explanation:
The Jbutton class is used to create a buttin that have platform-independent implementation. |
|
14. |
JButton() creates a button with ____________.
|
A. |
text and no icon |
B.
|
no text and no icon |
C.
|
no text and icon
|
D.
|
text and icon
|
|
Answer: Option C
Explanation:
JButton() creates a button with no text and icon. |
|
15. |
___________ creates a button with the specified text on button.
|
A. |
JButton() |
B.
|
JButton(String s) |
C.
|
Button(String s)
|
D.
|
JButton(String)
|
|
Answer: Option B
Explanation:
JButton(String s) creates a button with the specified text on button. |
|
16. |
_____________creates a button with the specified icon object.
|
A. |
button(Icon i) |
B.
|
Jbutton(i) |
C.
|
Jbutton(Icon i)
|
D.
|
Jbutton(Icon)
|
|
Answer: Option C
Explanation:
Jbutton(Icon i) creates a button with the specified icon object. |
|
17. |
_______________ is used to set specified text on button.
|
A. |
public void setText(String s) |
B.
|
public void setText() |
C.
|
public void setText(String)
|
D.
|
public void Text(String s)
|
|
Answer: Option A
Explanation:
public void setText(String s) is used to set specified text on button. |
|
18. |
______________ is used to return the text of the button.
|
A. |
public getText() |
B.
|
public String Text() |
C.
|
String getText()
|
D.
|
public String getText()
|
|
Answer: Option D
Explanation:
public String getText() is used to return the text of the button. |
|
« prev
next »