In: Computer Science
Ex : Each of the following questions is about event processing.
Mark T if the question is valid, otherwise F.
(1) Subclasses of EventObject on components handle special types of
events such as action, window, component, mouse, and key events (
)
(2) Source objects activate events, event-related objects handle
events, and event-related objects are called risers ( )
(3) For all event types, the riser interface is usually named
XListener for Xevent (except for MouseMotionListener) ( )
(4) e.getSource() may be used to determine if the source object is
a button, check box, or radio button ( )
(5) Since the riser class is not shared by other applications, it
is appropriate to be defined inside the frame as an internal class
( )
(6) Since all methods within the riser interface are abstract and
require implementation of all methods, classes called adapters are
provided for convenience ( )
Please solve the problem. and Please Let me explain the process.
Thank you:)
(1) Subclasses of EventObject on components handle special types of events such as action, window, component, mouse, and key events (True )
Explanation: In java AWT Event classes,the subclasses on Eventobject handles various special types pf events such as
1.Action events
2.Adjustment event
3.Component event
4.Container event
5.Focus event
6.Input event
7.Item event
8.Key event
9.Mouse event
10.Text event
11.Windows event
So Hence the above condition is true
(2) Source objects activate events, event-related objects handle
events, and event-related objects are called risers (False )
Expanation:Source objects activate events,event related objects handle events.these event related objects are called as listeners not risers,these listeners are responsible for generating response to an event.
3) For all event types, the riser interface is usually named XListener for Xevent (except for MouseMotionListener) (False)
Explanation:First of all there is no any interface called as risers in Event handling
(4) e.getSource() may be used to determine if the source object is
a button, check box, or radio button ( True)
Explanation:getsource() method in java is used to determine which component outsourced the event such as button,check box or radio button.
(5) Since the riser class is not shared by other applications, it
is appropriate to be defined inside the frame as an internal class
(False )
Explanation: There is no any class called as riser class in java,
(6) Since all methods within the riser interface are abstract and
require implementation of all methods, classes called adapters are
provided for convenience (False )
Explanation:There is no any interface in the java called as risers.