Assignment Chapter 3MCQ
Assignment Chapter 3MCQ
Q. 1. The Following steps are required to perform Implement the Listener interface and overrides
(a) java.awt
(b) java.awt.Graphics
(c) java.awt.event
Q. 4 To use the ActionListener interface it must be implemented by a class there are several ways
(a) True
(b) False
Q. 6 The ActionListener interface is used for handling action events, For example, it's used by a
(a) Button,List,MenuItem
(b) Button,Checkbox,Choice
(c) Scrollbar,Component,Button
Q. 8 In Graphics class Which method is used to set the graphics current color to the specified color?
Q. 9 Which of the following method is used to determine the type of adjustment event?
(a) ActionEvent,ItemEvent
(c) ScrollEvent,TextEvent
(b) pressed
(c) released
(a) KeyEvent
(a) Window
(b) RadioButton
(c) ScrollBar
(d) None
Q. 16 Name the method defined in EventObject class that returns the object generated from the event.
(a) getEvent( )
(b) getObject( )
(c) getId( )
(d) getSource( )
Q. 18 ActionEvent is applied on
(a) Frame(b) Checkbox, Choice, List(c) Scrollbar(d) Button, TextField, List, Menu
(a) ItemListener
(b) InputEvent
(c) SelectEvent
(d) ListEvent
(a) getCommandName( )
(b) getActionEventCommand( )
(c) getActionCmd( )
(d) getActionCommand( )
(a) ActionEvent
(b) ItemEvent
(c) TextEvent
Q. 25 When we need to use Checkbox or Item from the list or use a checkable Menu an is generated.
(a) WINDOW_ACTIVATED
(b) WINDOW_CLOSED
(c) WINDOW_DEICONIFIED
(b) Button,Checkbox,Choice
Q. 30 Which of this package contains all the classes and methods required for event handling in Java.
Q. 31 Name the method defined in EvenObject class that returns the object generated from the event.
(a) ComponentListener
(b) ContainerListener
(c) ActionListener
(d) InputListener
(a) ItemListener
(b) ActionListener
(c) FlowListener
(d) Adapter
Q. 34 Clicking the closing button on the upper right corner of a frame generates a (n) ‐event.
Q. 35 Which of the following method must be overridden in the order to handle KeyEvent.
Q. 36 Which of these methods can be used to know the degree of adjustment made by the user?
(a) getValue( )
(b) getAdjustmentType( )
(c) getAdjustmentValue( )
(d) getAdjustmentAmount( )
(a) ComponentEvent
(b) ContainerEvent
(c) ItemEvent
(d) InputEvent
(a) Listener
(b) Sources
(c) Event