I would like to know how do I populate a TableView with data... All the examples I have seen creates a TableView with columns and everything and add it to the scene. All don
Yo can do this in your controller:
@FXML
private TableView table;
private List users;
@Override
public void initialize(URL url, ResourceBundle rb) {
// Set the columns width auto size
table.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
table.getColumns().get(0).prefWidthProperty().bind(table.widthProperty().multiply(0.33)); // 33% for id column size
table.getColumns().get(1).prefWidthProperty().bind(table.widthProperty().multiply(0.33)); // 33% for dt column size
table.getColumns().get(2).prefWidthProperty().bind(table.widthProperty().multiply(0.33)); // 33% for cv column size
table.getItems().setAll(this.users);
}