AbstractTableModel Error


I'm trying to build my own table. I'm using AbstractTableModel and implemented the required methods.
I got an error when writing a node's property, which can be seen above. What am I doing wrong?

public node<> getValueAt(final int row, final int column) { 
  if (row == 0 && column >= 0) { return node.header[column]; } 
  if (row > 0 && column >= 0) { 
    ModelAccess.instance().runWriteAction(new Runnable() { 
      public void run() { 
        node.cells[row - 1].ColumnId = column; 
    return node.cells[row - 1]; 
  return null; 

IllegalModelChangeError: registered node can only be modified inside undoable command or in 'loading' model [blocks] Block null[7254180275177669677] in BlockWithTable.sandbox.model

1 comment
Comment actions Permalink
As the error indicates, you should be using an undoable command - perhaps using executeCommandInEDT() could help here.


Please sign in to leave a comment.