Multiple Choice
If the makeMenuItem method is called four times, at most how many different actions can be performed by these four newly created MenuItem objects when the doSomethingElse method is called? public JMenuItem makeMenuItem(String menuLabel)
{
JMenuItem mi = new JMenuItem(menuLabel) ;
Class MyMenuListener implements ActionListener
{
Public void actionPerformed(ActionEvent
A) 1
B) 2
C) 3
D) 4
E) {
DoSomethingElse(e) ;
}
}
mi.addActionListener(new MyMenuListener() ) ;
Return mi;
}
Correct Answer:

Verified
Correct Answer:
Verified
Q4: If the method makeMenuItem is called four
Q5: Suppose a JPanel with a BorderLayout manager
Q6: Suppose a JPanel with a BorderLayout manager
Q8: What is the best way to start
Q9: What is wrong with the following code?
Q10: Which of the following adds a border
Q11: What can be determined about obj from
Q12: Which layout manager uses a grid, but
Q26: The _ interface toolkit has a large
Q27: What method is required by the ChangeListener