![]() A) Invoke the component's requestFocus method to set focus on this component B) Implement the KeyListener interface for the component C) Override the isFocusTraversable method defined in the Component class to return true D) All of the above.Ħ) The listener's _ method is invoked after a mouse button is pressed (but not released yet). A) MouseMotionListener/MouseMotionAdapter B) WindowListener/WindowAdapter C) MouseListener/MouseAdapter D) ComponentListener/ComponentAdapterĥ) To enable a component to listen to keyboard events, you need to _. E) None of the above.Ĥ) To listen to mouse clicked events, the listener must implement the _ interface or extend the _ adapter. D) The actionPerformed method is not executed when you click the OK button, because no instance of Test is registered with jbtOK. C) The program has a runtime error because no listeners are registered with jbtOK. B) The program has a syntax error because no listeners are registered with jbtOK. Import java.awt.* import .* import javax.swing.* public class Test extends JFrame implements ActionListener A) The message "The OK button is clicked" is displayed when you click the OK button. A) ContainerListener B) MouseListener C) WindowListener D) FocusListener E) ActionListener (choose all that apply) A) JButton B) JLabel C) JPanelĢ) The interface _ should be implemented to listen for a button action event. Choose the one alternative that best completes the statement or answers the question. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |