< Day Day Up > |
By implementing a tree model listener, you can detect when the data displayed by a tree changes. You might use a tree model listener to detect when the user edits tree nodes. To see an example and a discussion, read Dynamically Changing a Tree (page 447) in Chapter 7. The Tree Model Listener APITable 37 lists the methods in the TreeModelListener interface and Table 38 describes the methods in the TreeModelEvent class. Note that TreeModelListener has no adapter class. Also refer to the TreeModelListener API documentation at: http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/event/TreeModelListener.html. The TreeModelEvent API documentation is online at: http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/event/TreeModelEvent.html. Table 37. The TreeModelListener Interface
Table 38. The TreeModelEvent API
Examples That Use Tree Model ListenersThe following examples use tree model listeners.
|
< Day Day Up > |