Swing Data Model Case Study

  • John Hunt
Part of the Practitioner Series book series (PRACT.SER.)


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. ⋆.




Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Online Resources

  1. The Java Tutorial: Using the JFC “Swing” Release: http://java.sun.com/docs/books/tutorial/post1.0/ui/swing.html.
  2. (see section entitled “How to Use Trees”). The JFC Home Page: http://java.sun.com/products/jfc/index.html.

Copyright information

© Springer-Verlag London Limited 1999

Authors and Affiliations

  • John Hunt
    • 1
    • 2
  1. 1.Department of Computer ScienceUniversity of WalesAberystwyth, Dyfed, WalesUK
  2. 2.JayDee TechnologyChippenhamUK

Personalised recommendations