Summary

 <  Day Day Up  >  

This chapter discussed the event-handling mechanism, the Event object, and how to write event listeners. Event adapters were also discussed, as well as the recommendation to avoid creating more classes in your program than are strictly necessary.

The "Listener API Summary" table (page 123) shows the methods defined in each listener interface.You might find the information in Listeners Supported by Swing Components (page 118) particularly useful ”it shows the listeners supported by all Swing components and is followed by a table showing the unique listeners supported by each component.

When writing an event listener, you should first check the how-to section for the particular component ”for example, How to Use Check Boxes (page 163) shows you how to handle mouse clicks on check boxes using an item listener. If you still have questions, you should refer to the particular how-to section in Chapter 10, Event Listeners Reference (page 643) ”for example, How to Write an Item Listener (page 674) or How to Write Window Listeners (page 723).

The Solving Common Event-Handling Problems (page 739) section in the Appendix may help with any particular problems you encounter.

 <  Day Day Up  >  


JFC Swing Tutorial, The. A Guide to Constructing GUIs
The JFC Swing Tutorial: A Guide to Constructing GUIs (2nd Edition)
ISBN: 0201914670
EAN: 2147483647
Year: 2004
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net