code: @Override
      public void undoableEditHappened(UndoableEditEvent arg0) {
          UndoableEdit edit = arg0.getEdit();
          undoManager.addEdit(edit);
      }
docs: /*
  (non-Javadoc)
  @see
  javax.swing.event.UndoableEditListener#undoableEditHappened(javax.swing
  .event.UndoableEditEvent)