public boolean isCellEditable(int rowIndex, int columnIndex) {
//第一列不可編譯
if(0 <= rowIndex && rowIndex < getRowCount() && columnIndex == 0){
return false;
}else{
return true;
}
或者
public boolean isCellEditable(int rowIndex, int columnIndex) {
//第一列不可編譯
if(0 <= rowIndex && rowIndex < getRowCount() && columnIndex == 0){
return false;
}else{
return true;
}
//設定第一行不可編輯
public boolean isCellEditable(int rowIndex, int columnIndex) {
if (columnIndex == 0) {
return false;
}
return true;
}
//希望對jtable有困惑人幫助