This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma 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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Disable certain rows in a JTable" Watch "Disable certain rows in a JTable" New topic

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 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:
subject: Disable certain rows in a JTable
It's not a secret anymore!