Hello,
I am using an AbstractObjectTable to build a table and I would like to know how to make a column editable. I want to change the value of a column when I double click on it. Moreover, in another column I would like the user to be able to write directly on it after double clicking.
This code produces the error: Unexpected setValue() on read-only table. Thanks in advance.Code:@Override protected void onDoubleClick(){ int row = getTable().getSelectedRow(); int col = getTable().getSelectedColumn(); Object value = getTable().getValueAt(row, col); if(col == 1){ if(value.equals("F")){ getTable().setValueAt("B", row, col); } else{ getTable().setValueAt("F", row, col); } } }


Reply With Quote