Users usually expect disabled (un-editable) components to be marked with a distinctive background. For most components, that is true. However, default JTable renderer does not render uneditable cells any different than editable cells. So, shade disabled cells to make your table more user-friendly. Here is a snippet that does the work1).
class DisabledCellRenderer extends DefaultTableCellRenderer{ public Component getTableCellRendererComponent( JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (table.isCellEditable(row, column)) setBackground(Color.WHITE); else setBackground(Color.LIGHT_GRAY); return super.getTableCellRendererComponent( table, value, isSelected, hasFocus, row, column); } }