What Next?
With this control over the look of a tree and its contents, you can create some impressive interfaces for a wide variety of data and your own network management software that lets you browse domains and subdomains and computers and users. Any hierarchy of information you can think of can be shown graphically.
It is worth pointing out, however, that you are not restricted to
graphical applications with these models. You can use DefaultTreeModel to store regular,
hierarchical data, even if you have no intention of displaying the data
on a screen. The model is flexible and provides a good starting point if
you don’t have any tree data structures of your own lying
around.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access