• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing the color of Jtable base on a row of cell value in one column  RSS feed

 
Luca Rina
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code is



Can anyone tell me where i went wrong ?
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you want to change the background of individual cells in your table, depending on the cell value. The correct way to do this is to use custom renderers with your table. Please have a look at the tutorial first, and come back if anything remains unclear after reading it.
 
Rob Camick
Ranch Hand
Posts: 2788
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Table Row Renderering for an example of rendering an entire row based on a value in the row.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!