CHAPTER 7

image

Using Swing’s JTable

Many applications need to display data in a tabular form, and Swing provides a table component (also sometimes called a grid) that allows you to do so. The JTable class, defined in the javax.swing package, provides a great deal of functionality that you can use to create a user interface for viewing and updating data. This chapter covers some of the functionality that’s commonly needed when using a table component and illustrates how to implement it using JTable. In the process, you’ll learn a great deal about how JTable works, how to use its existing capabilities, and how to extend its capabilities.

In this chapter, ...

Get Pro Java 8 Programming, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.