Solved

Assuming That the ClickListener Class Implements the ActionListener Interface, What

Question 17

Multiple Choice

Assuming that the ClickListener class implements the ActionListener interface, what statement should be used to complete the following code segment? ClickListener listener = new ClickListener() ;
JButton myButton = new JButton("Submit") ;
JPanel myPanel = new JPanel() ;
MyPanel.add(myButton) ;
______________________ // missing statement


A) myPanel.addActionListener(listener) ;
B) myButton.addActionListener(listener) ;
C) myPanel.addActionListener(myButton) ;
D) myButton.addActionListener(ClickListener) ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions