Examine the code below. What type of class is MyMenuListener?
Public JMenuItem makeMenuItem(String menuLabel)
{
JMenuItem mini = new JMenuItem(menuLabel) ;
Class MyMenuListener implements ActionListener
{
Public void actionPerformed(ActionEvent
A) It is an anonymous class
B) It is an inner class
C) It is a JMenuItem subclass
D) It is a JMenu class
E) {
DoSomething() ;
}
}
Mini.addActionListener(new MyMenuListener() ) ;
Return mi;
}
Correct Answer:
Verified
Q43: What is the best way to start
Q47: If one ChangeListener is listening for three
Q53: If the makeMenuItem method is called four
Q55: Which code will create a JSlider with
Q56: If the method makeMenuItem is called four
Q65: The _ class in the javax.swing package
Q66: What type of event does the JSlider
Q68: The ChangeEvent class defines no methods.What makes
Q75: The _ interface toolkit has a large
Q81: When you use a timer, you need
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents