An ActionEvent is generated when a button is pressed ,a lis item is double clicked or menu item is selected .The Action Event class defines four integer constants that can be used to identity any modifiers associated with an action event ALT_MASK ,CTRL_MASK,META_MASK and SHIFT_MASK.In addition there is an integer constant ACTION_PERFORMED which can be to identity action events
ActionEvent has these three constructors
ActionEvent(Object src,int type,String cmd)
ActionEvent(Object src,int type,String cmd,int modifiers)
ActionEvent(Object src,int type,String cmd,long when,int modifiers)
src is a reference to the object that generated this event .the type of the specified by Type ,and its command string is cmd,the argument modifiers indicates which modifiers key(ALT,CTRL,META,SHIFT) were pressed when the event was generated .The when parameter specifies when the event occurred.
0 comments:
Post a Comment