Changing background color (or just color) of row (javafx)
问题 I've a TableView . I want to change background color of rows according to some condition. For instance, if balance ( getBalance() ) is less than zero - set background color of that row to red. Here is my setCellValueFactory : tc_proj_number.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getId().toString())); tc_proj_date.setCellValueFactory(cellData -> new SimpleStringProperty(cellData.getValue().getValueDate().toInstant().atZone(ZoneId.systemDefault())