0

I have the next problem, any help appreciate, I have tried many ways but I can not solve the problem.

The problem is, i have the next table View in Javafx.

  Number   Name     Age 
  7        Ana      21 
  7        Peter    23 
  11       David    44 
  11       Carmen   54 
  17       Rosa     55 
  21       Alex     78 

I want to use only 2 color in the next way. The first 2 rows in one color (Number=7), for example, blue, then the next 2 rows (Number=11) in other color, red, then the next row ( Number=17 ) again in blue, and the next row (Number=21) in red, etc, etc.....in any change of value in column Number, change the color.....

Thanks in advance. Aldo.

aulloa
  • 1
  • 1
  • Use a customer cell renderer, you can use this as a starting point: http://code.makery.ch/blog/javafx-8-tableview-cell-renderer/ – GregH Dec 23 '15 at 15:58
  • Also see http://stackoverflow.com/questions/28340874/javafx-adding-color-to-row-based-on-column-value and http://stackoverflow.com/questions/20350099/programmatically-change-the-tableview-row-appearance (and several others) – James_D Dec 23 '15 at 16:12

0 Answers0