Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable certain rows in a JTable

 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I thought this would be trivial, but it's not! I just want to disable certain rows of a JTable from being selected and to make them grayed out to appear uneditable to the user. Any ideas?
Paul
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You make them non-editable with isCellEditable() of your model. The color with a renderer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic