This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable certain rows in a JTable