void (TreeSelectionEvent e) { myCurrentSelection = new ArrayList<>(); TreePath[] selection = myTree.getSelectionModel().getSelectionPaths(); if (selection == null) return; for (TreePath treePath : selection) { myCurrentSelection.add((TreeNode)treePath.getLastPathComponent()); } }