Reputation: 402
I try to select a row in a TableView in Controller.initialize() method like this:
public class Controller {
public void initialize() {
...
ObservableList<Operation> rows = FXCollections.observableArrayList(row1, row2);
table.setItems(rows);
table.getSelectionModel().select(row1);
}
}
The application starts and the table row is unselected. If I touch scroll bar the selection appears. And stopping in debug mode during startup I can see it is actually selected.
What is wrong? How that can be fixed?
Upvotes: 0
Views: 138
Reputation: 402
It were .css rules that specify the same color for an inactive (unfocused) selected row.
Upvotes: 0