How to gray-out non-editable cell in jtable?

Return an instance of GrayableCheckboxCellRenderer in a TableCellEditor.

Addendum: Aesthetically, you may want to condition the renderer’s and editor’s colors based on the defaults provided by the current Look & Feel, for example:

Color hilite = UIManager.getColor("Table.selectionBackground");

Leave a Comment