posted 20 years ago
Implement a renderer that detects if the cell is editable and disables or enables itself appropriately...
Since you may be trying to do it the "backwards way" through the model because you are using different renderers and don't want to change each of them, I'll make this a "wrapper renderer" that takes a current renderer as a constructor parameter and delegates all the drawing to that renderer first. All you have to do to use this in your table is to call new EnableWrapperTableCellRenderer( oldRenderer ) whenever you set a renderer on your table or column.
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.