O'Reilly logo

JavaFX For Dummies by Doug Lowe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Working with Tables

In This Chapter

arrow Creating rows and columns with the TableView control

arrow Using the TableColumn class to format the individual columns of a table

arrow Building a simple items list for a TableView

arrow Editing the contents of a TableView control

A JavaFX table is one of JavaFX’s most flexible and powerful controls; it lets you display data in a spreadsheet-like format, with rows of data aligned in neat columns. Both horizontal and vertical scrolling is provided automatically, and you can configure the table control to allow the user to edit the contents of the table’s cells.

In this chapter, you discover several classes that work together to create a table. The first is the TableView class, which renders the table within a scene. A table consists of one or more columns that are created using the TableColumn class. Thus, to create a table, you must first create one or more table columns using the TableColumn class, and then use the TableView class to create a table, and finally add the columns to the table.

Because a table control is inextricably bound to an underlying ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required