How to set a TableRow's background colour based on whether or not it's selected and/or a value in the data model, in a JavaFX8 TableView?
问题 A relative Java newbie question. I'm trying set a TableRow 's background colour based on whether or not it's selected and/or whether or not a boolean value in the data model is true. I've found ways of doing each but not both together in the same setRowFactory . What I would like to end up with is this (albeit with horrible colours for example purposes only!): How would I go about achieving that? This is what I found wrt changing row colour based on selection. It's adapted from user James_D's