< Day Day Up > |
http://java.sun.com/docs/books/tutorial/uiswing/events/index.html This chapter gives you details about writing event listeners. It assumes you've already read Handling Events (page 19) in Chapter 2, which gives an overview of the event model. You might not need to read this section, at all. Your first source of information for event information should be the how-to section for the component in question. You can find the appropriate section using A Visual Index to Swing Components (page 37) in Chapter 3. Each component's section shows code for handling the events most commonly needed when implementing the component. For example, How to Use Check Boxes (page 163) in Chapter 7 shows you how to handle mouse clicks on check boxes using an item listener. This chapter contains the following sections:
If you're having some hard-to-debug problems related to handling events, you may find the solutions in Solving Common Event-Handling Problems (page 739) in the Appendix.
|
< Day Day Up > |