...............Event ......
1.Explain the purpose of Event object.
1.Explain the purpose of Event object.
EventObjects represent events. Applications subclass this class to add event specific information...............
2.What is an action event?
An action event is a semantic event which indicates that a component-defined action occured. The ActionListener interface gets this ActionEvent when the event occurs.............
3.Explain the different kinds of event listeners.
The different kinds of event listeners are: WindowEvent, ActionEvent, PaintEvent, ComponentEvent.......
4.What is event adapter class? When should we use an event adapter class?
Usually adapter classes ease the programmers by providing implementations of the listener interfaces instead of having to implement them..
5.What is the relationship between an event-listener interface and an event-adapter class?
When you declare to implement an event listener, then you should write the definitions of all the methods that have been declared in the interface.............
Read answer
What is the difference between the paint() and repaint() methods?
The paint() method is called when some action is performed on the window.
6.What is the purpose of the enableEvents() method?
When you register a listener, enableEvents() is called. So you don’t have to do this separately. However, there could be situations where you need an object to handle its own events................
7.What is the difference between a Scrollbar and a ScrollPane?
A Scrollbar is a Component.
Scrollpane is a Container. It can handle its own events and perform it's own scrolling..................
No comments:
Post a Comment