GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes Disable certain rows in a JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Disable certain rows in a JTable" Watch "Disable certain rows in a JTable" New topic
Author

Disable certain rows in a JTable

Paul Smiley
Ranch Hand

Joined: Jun 02, 2000
Posts: 244
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

Joined: May 17, 2001
Posts: 2823
You make them non-editable with isCellEditable() of your model. The color with a renderer.
 
GeeCON Prague 2014
 
subject: Disable certain rows in a JTable