Is it possible to disable selection for a certain cell in jtable?

public Component getTableCellRendererComponent

(JTable table, Object value, boolean isSelected, boolean hasFocus, int

row, int column)


Component c = super.getTableCellRendererComponent

(table, value, isSelected, hasFocus, row, column);

setForeground( (column == this.col && row == this.row)

? Color.RED : Color.BLACK );

return c;


I'm able to color my specific cell. But i cant find the method to disable selection of a certain cell. Isenabled = false doesnt seem to work...

Read More »

By: StackOverFlow - Wednesday, 14 March

Related Posts