In JavaFx every row is by default white and on click action the background is blue and text color white. I changed the background of every odd row with css like this:
.table-row-cell:odd{
-fx-background-color: #b3b300;
}
but I do not know how can i change the background and the text color when a row is selected Only for odd rows. For even rows i do not want to change anything.