java left logo
java middle logo
java right logo
 

Home arrow Java SE Tips arrow java.awt.event arrow What types of Events exist in Swing
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 4097
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
What types of Events exist in Swing E-mail
User Rating: / 27
PoorBest 

Swing has the following types of events:

Action events:

Action events occur when a user completes an action using one of the following components: JButton, JCheckBox, JComboBox, JTextField, or JRadioButton.

A class must implement ActionListener interface in order to handle those events. The actionPerformed(ActionEvent) method is the only method of the ActionListener interface.

Adjustment Events:

Adjustment Events occur when a JScrollBar component is moved. To handle these events, a class must implement the AdjustmentListener interface. The adjustmentValueChanged(AdjustmentEvent) method is the only method in the AdjustmentListener interface.

Focus Events

Focus events occur when any component gains or loses input focus on a graphical user interface. Focus applies to all components that can recieve input.

To handle a focus event, a class must implement the FocusListener interface.

Item Events:

Item events occur when an item is selected or deselected on any of the following components: JButton, JCheckBox, JComboBox, or JRadioButton. A class must implement the ItemListener interface in order to handle these events.

Key Events:

Key events occur when a key is pressed on the keyboard. Any component can generate these events, and a class must implement KeyListener interface to support them.

Mouse Events:

Mouse events are generated by the following types of user interaction:

  • A mouse click
  • A mouse entering a component's area
  • A mouse leaving a component's area

Any component can generate these events, and a class must implement MouseListener interface to support them.

Mouse Motion Events:

Mouse motion events occur when a mouse is moved over a component. Any component can generate these events, and a class must implement MouseMotionListener interface to support them.

Window Events:

Window events occur when a user opens or closes a window object, such as a JFrame or a JWindow. Any component can generate these events and a class must implement WindowListener interface to support them.


 Related Tips

 
< Prev

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.