Swing Classes & Events
Home ] Up ] History ] Why a New Event Model? ] Relationship Between Models ] The Java 1.1 Event Model ] AWT Event Hierarchy ] The Event Classes & Interfaces ] [ Swing Classes & Events ]

 

 

JFC/Swing contains a very large number of classes, and so coming up with a table of events used by each Swing component is difficult, and would become obsolete very quickly.  

Note that many of the JFC/Swing classes, such as JFrame, JPanel, etc., are subclasses of AWT component and other Swing component classes, and so inherit some of their event generation behavior.

To determine what events are generated by a JFC/Swing class, first look at the javadoc for that class:

  • Read the description of the class;  often there is a description of (some of) the events that the class generates, and under what circumstances.  Note that you may find that it's buried somewhat, so read it thoroughly!
  • Look for methods in the class with the signature:
    public void addMumbleListener(MumbleEvent e)  

    The presence of such a method indicates that the class generates events that can be listened for.  The Mumble represents the type of event.

  • Now look at each superclass, following the same process, until you reach the top of the inheritance hierarchy.
 

This page was last modified on 02 October, 2007