Swing Data Model Case Study

This chapter presents an example of a Swing component which uses a complex data model. In this case we will examine the JTree swing component, which requires a data model which represents the tree being displayed. The JTree component renders the tree data model; thus if the data model changes, the tree rendered by JTree also changes. To illustrate these ideas we will construct a simple application which displays all the classes inherited by a specified class. Note that a second Swing package will be used: javax.swing.table. ⋆.