• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Understanding Swing Events

Earlier in this chapter, in "Using the Abstract Windowing Toolkit," you learned about the delegation event model and about low-level and semantic events. Swing has its own event package for Swing-specific events. Use the javax.swing.event package for the event listeners and the events themselves; the event sources are the Swing components. The following is a list of the Swing event classes—DocumentEvent is an interface—and their meanings.

Note

Many Swing events, such as those that refer to the "model," assume that you're using the MVC pattern. Read the Swing documentation on MVC or Chapter 13 of Using Java 1.2 before attempting to use these Swing events.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint