Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

making a row grey in JTable  RSS feed

 
Pristi Sanyal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i m facing a problem in making a row grey which is not editable. Rest all the rows are editable. I have to make the first row grey. But when qrite code to make 1 row grey, it greys out the whole table.. do any1 have the solution
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need your own renderer (implement TableCellRenderer). Override this method:

Just check on what you need and set the color.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!