//Add listener of table selection to refresh edit window when the selection changes (and if the table is not being refreshed):
outlineTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (!refreshingTable) {
EditWindowController edc = Lookup.getDefault().lookup(EditWindowController.class);
if (edc.isOpen()) {
if (outlineTable.getSelectedRow() != -1) {
edc.editNodes(getNodesFromSelectedRows());
} else {
edc.disableEdit();
}
}
}
}
});