Abstract
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. ⋆.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Online Resources
The Swing Connection: http://java.sun.com/products/jfc/swingdoc-current/doc/index.html.
The Java Tutorial: Using the JFC “Swing” Release: http://java.sun.com/docs/books/tutorial/post1.0/ui/swing.html.
(see section entitled “How to Use Trees”). The JFC Home Page: http://java.sun.com/products/jfc/index.html.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag London Limited
About this chapter
Cite this chapter
Hunt, J. (1999). Swing Data Model Case Study. In: Java for Practitioners. Practitioner Series. Springer, London. https://doi.org/10.1007/978-1-4471-0843-6_21
Download citation
DOI: https://doi.org/10.1007/978-1-4471-0843-6_21
Publisher Name: Springer, London
Print ISBN: 978-1-85233-093-4
Online ISBN: 978-1-4471-0843-6
eBook Packages: Springer Book Archive