My application contains:
An arraylist of integers. this list update every few second (numbers are added and other are deleted)
Tableview<Data>
the Data contains several fields and
semNumId
field (which is integer)I want to be able to paint the rows, which the arraylist contains the semNumId numbers with green colour.
the arraylist may be change (and the tableview data will contain the same data). so the green colour may be set on and off without changing the table data
I have look here:
JavaFx How to set row background color of specifics rows in TableView
but seems it doesn't help much.
How can I implement this ?
pay attention that:
tableView.setRowFactory(tv -> {
TableRow<Data> row = new TableRow<>();
create new tableRow which I cant check if it's semNumId in the list (because when creating with new operation the default is 0);
Please add example code