Programming - Swings
You Are Here :: Home > JAVA > Swings - General Questions
19. |
public void setEnabled(boolean b) is used to __________ the button.
|
A. |
enable |
B.
|
disable |
C.
|
enable or disable
|
D.
|
none
|
|
Answer: Option C
Explanation:
public void setEnabled(boolean b) is used to enable or disable the button. |
|
20. |
public void setIcon(Icon b) is used to set the __________ on the button.
|
A. |
un specified Icon |
B.
|
specified Icon |
C.
|
icon
|
D.
|
variable
|
|
Answer: Option B
Explanation:
public void setIcon(Icon b) is used to set the specified Icon on the button. |
|
21. |
___________ is used to get the Icon of the button.
|
A. |
public Icon getIcon() |
B.
|
Icon getIcon() |
C.
|
public Icon()
|
D.
|
public getIcon()
|
|
Answer: Option A
Explanation:
public Icon getIcon() is used to get the Icon of the button. |
|
22. |
public void setMnemonic(int a) is used to set the ___________ on the button.
|
A. |
string |
B.
|
value |
C.
|
mnemonic
|
D.
|
all the above
|
|
Answer: Option C
Explanation:
public void setMnemonic(int a) is used to set the mnemonic on the button. |
|
23. |
public void addActionListener(ActionListener a) is used to ___________ the action listener to this object.
|
A. |
delete |
B.
|
modify |
C.
|
add
|
D.
|
none
|
|
Answer: Option C
Explanation:
public void addActionListener(ActionListener a) is used to add the action listener to this object. |
|
24. |
The _________ is used to create a radio button.
|
A. |
RadioButton class |
B.
|
JRadioButton class |
C.
|
JRadioButton(String s)
|
D.
|
JButton(String s)
|
|
Answer: Option B
Explanation:
The JRadioButton class is used to create a radio button. |
|
« prev
next »