May 2018
Intermediate to advanced
268 pages
6h 43m
English
As with a ListView, a TableView is backed up by ObservableList. But, to maintain the model-view connection, there are additional requirements for that list content:
Let's take a look at an example here of a class representing a chapter in this book:
// chapter10/table/TableViewDemo.javaclass Chapter { private final String title; private final int number; public Chapter(int number, String title) { this.title = title; this.number = number; } public String getTitle() { return title; } public int getNumber() { return number; }}
Using this object, we can create a list to be used later as data for a table:
private final ...
Read now
Unlock full access