Jtree also lets you edit data about the nodes, add new nodes and prune. You use the TreeModel interface implemented by DefaultTreeModel to manage your tree data. You change the tree by poking the TreeModel, not by poking the TreeNodes directly. You can also use TreeNodes independent of a display, though most algorithmic tree handling is done with specialised classes.
Note that it is spelled JTree not Jtree
JTree Classes | |
---|---|
Class | Purpose |
JTree | master GUI component |
DefaultTreeModel | used this code as a base to hold all your tree data. |
TreeNode | Interface to write code for a node if the user may not modify. |
MutableTreeNode | Inteface to write code for a node the user can modify either by adding or removing children or by changing the value associated with the node. Normally use DefaultMutableTreeNode. |
DefaultMutableTreeNode | use this code as a base to hold data for one node of your TreeModel |
TreePath | represents a hierarchical chain through the tree. |
TreeCellRenderer | Interface for your code to display a node. |
DefaultTreeCellRenderer | using this code as a base to write your own cell renderer. |
TreeCellEditor | Interface for your code to allow user to edit a node. |
DefaultTreeCellEditor | using this code as a base to write your own cell editor. |
TreeSelectionListener | interface to write your own code to respond to user selecting/deselecting a node. |
This page is posted |
http://mindprod.com/jgloss/jtree.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\jtree.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.135.208.189] |
| |
Feedback |
You are visitor number | |