I have 7 colums in a JTable.
I want the first 6 to be uneditable and the last to be editable.
How do you do this with a JTable?
I had to extend it to get the functionality but I'm sure there must ba an easier way.
class MyJTable extends JTable {
MyJTable(
String[][] data, String[] columnNames) {
super(data, columnNames);
}
public boolean isCellEditable(int row, int col) {
if (col < 6) {
return false;
} else {
return true;
}
}
}