Tuesday, January 26, 2010

Unit-7
I. Each Question Carries 1 Mark.

1) The modern approach to handling the events is based on _______ model.
a) delegation event b) deprecated c) applet d) None

2) What is the object that describes a change of state in a source.
a) event b) sequence c) Thread d) None

3) A source must register listeners in order for the listeners to receive notification
a) add Type Listeners() b) add Listener() c) update Listener() d) set listener()

4) When an event occurs all registered listener notified and receive a copy of the event object. This is known as
a) Multicasting b) Single casting c) Casting d) Typecasting

5) What is the object that is notified when an event occurs
a) listener b) watcher c) notify d) class

6) The superclass for all events.
a) EventObject b) Throwable c) Object d) Class

7) The class AWTEvent is defined in ______________ package.
a) java.awt b) java.util c) java.lang d) None

8) When a button is pressed or a list item is double clicked, or a menu item is selected, which event is generated ?
a) Action Event b) Component Event c) Container Event d) Focus Event

9) Which event is generated when a scroll bar is adjusted
a) Adjustment Event b) Component Event c) Container Event d) Focus Event

10) Which event is generated when a check box or list item is clicked.
a) Item Event b) Component Event c) Container Event d) Focus Event

11) What event is generated when a mouse is moved or dragged ?
a) Mouse Event b) Component Event c) Container Event d) Focus Event

12) What event is generated when a window is activated closed or iconified ?
a) WindowEvent b) ComponentEvent c) ContainerEvent d) FocusEvent

13) What is the only method of action Listener ?
a) actionPerformed b) actionForm c) actionFired d) None

14) If the mouse is dragged or moved, we implement the following interface
a)MouseMotionListener b. MouseListener c) FocusListener d) None

15) If the mouse is clicked, ener or exit, we implement the following interface
a) MouseListener b) MouseMotionListener c) FocusListener d) None

16) Which class provides an empty implementation of all methods in an event listener interface.
a) Adapter Class b) Listener Class c) Impl Class d) None

17) To create child window within applets we usually use
a) Frame b) servlet c) menu d) None

18) A Frame window will not be visible until we call the following method.
a) setVisible(true) b) setVisible(false) c) setVisible(1) d) setVisible(0)


I. Answer – 1 Mark.


1.A 2. A 3. A 4. A 5. A 6. A 7. A
8. A 9. A 10. A 11. A 12. A 13. A 14. A
15. A 16. A 17. A 18.A