How to JTable - Editors and Renderers[
^]
you might want to read that.
You can deal with the TableCellRenderer. But that's fancy.
Much simpler, faster, easier and therefor recommended:
This approach[
^]
They simply overwrote the function
public boolean isCellEditable(int rowIndex, int colIndex) {
return false;
}
in JTable to give the specified allowance.