void () { // have to restore table selection since AbstractDataModel.fireTableDataChanged() clears all selection final TreePath[] treePaths = tree.getSelectionPaths(); super.fireTableDataChanged(); if (treePaths != null) { for (TreePath treePath : treePaths) { final int row = tree.getRowForPath(treePath); table.getSelectionModel().addSelectionInterval(row, row); } } }