0% found this document useful (0 votes)
8 views3 pages

Ajp 3rd Unit

Uploaded by

gursaliabhishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Ajp 3rd Unit

Uploaded by

gursaliabhishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. How to remove the event listener?

a) Using removeListener( ) method.


b) Using removeTypeListener( ) method.
c) Using removeEvent( ) method.
d) It is not possible to remove the event listener.

2. At the root of Java event hierarchy, which class is located?

a) AWTEvent
b) Event
c) EventObject
d) Events

3. Action event is generated when...

a) Label is dragged
b) Button is pressed
c) Mouse is dragged
d) Window is opened

4. How to obtain the command name for invoking ActionEvent?

a) Using getActionCommand( ) method.


b) Using getCommand( ) method.
c) Using getAction( ) method.
d) Using obtainAction( ) method.

5. When slider of scrollbar was dragged, which event is generated?

a) TRACK
b) DRAGGED
c) DRAG
d) SCROLLBAR_MOVED

6. FocusEvent is subclass of ...

a) ContainerEvent
b) ComponentEvent
c) ItemEvent
d) KeyEvent

7. When the InputEvent is not generated?

a) Key is entered through keyboard


b) Mouse is dragged
c) Mouse wheel is moved
d) None of the above

8. TextEvent defines the integer constant...

a) TEXT_CHANGED
b) TEXT_VALUE_CHANGED
c) TEXT_ADDED
d) TEXT_VALUE_ADDED

9. Which of the following is not event source?


a) MenuItem
b) CheckboxGroup
c) Window

11. Till now, two models have been introduced in Java for

a) Receiving and Processing events


b) Deleting and Processing events
c.)Receiving and Deleting events
d. Modifying and Receving events

12. An event is generated whe the internal state of the event source is________

a. Not changed
b. Changed
c. Either changed or not
d. None of these

13. EventObject class belongs to:

a. java.util
b. java.awt
c. java.lang
d. java.sql
14. The ___________ interface handles list events:
a. ContainerListener
b. FocusListener
c. ActionListener
d. ItemListener
15. The ___________ interface handles choice events:
a. ContainerListener
b. ItemListener
c. ActionListener
d. WindowListener
16. The ___________ interface is used to handle checkbox events:
a. ContainerListener
b. ItemListener
c. ActionListener
d. WindowListener
17. The ___________ interface is used to handle button events:
a. ContainerListener
b. ItemListener
c. ActionListener
d. WindowListener
18. A push button is an active control that has a _____________ appearance
a. One dimensional
b. Two dimensional
c. Three dimensional
d. None of these
19. ItemListener is defined by the _____________ method:
a. itemChangedState()
b. itemStateChanged()
c. itemChanged()
d. itemState()
20. _____________ is a superclass of TextField and TextArea classes that is used to
create single-line or multiline textfields respectively:
a. TextBox
b. CheckBox
c. TextComponent
d. Choice
21. A label is a simple control which is used to display_____________ on the window:
a. Text(non-editable)
b. Text(editable)
c. Both a & b
d. None of these
22. The Delegation Event Model defines a ______________ approach to handle events:
a. Logical
b. Physical
c. Both a & b
d. None of these
23. The Delegation Event Model is based on the concept of _____________
a. Source
b. Listener
c. Both a & b
d. None of these
24. A source generates an event and sends it to ___________ listeners that can handle
the event:
a. One
b. Two
c. One or more
d. None of these
25. Applet is a small program written in the Java programming language that
performs:
a. A specific task
b. May or may not be a part of a larger program
c. Both a & b
d. None of these
26. _______ generates action events when an item is double-clicked, generate action
events when an item is selected or deselected.
a. List
b. Check box
c. Menu item
d. Text box Label
27. ItemListener event defines this method...
a) itemEventChanged( )
b) itemEventOcurred( )
c) itemValueChanged( )
d) itemStateChanged( )
28. KeyEvent is generated in following sequence...
a) Key typed, pressed, released
b) Key released, typed, pressed
c) Key pressed, t

You might also like