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
Q4: A complex GUI can be created with
Q34: Which of the following classes has a
Q43: What is the best way to start
Q46: Which component can generate action events?
I JMenuBar
II
Q47: If one ChangeListener is listening for three
Q49: Suppose a JPanel with a BorderLayout manager
Q50: What is the best way to discover
Q66: What type of event does the JSlider
Q68: The ChangeEvent class defines no methods.What makes
Q75: The _ interface toolkit has a large
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