站内搜索: 请输入搜索关键词
当前页面: 图书首页 > JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Summary - JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Previous Section  < Day Day Up >  Next Section

Summary

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梚t 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梖or 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)梖or 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.

    Previous Section  < Day Day Up >  Next Section