void (ActionEvent event) { JTree tree = getTreeToPerformAction(); Action action = tree == null ? null : tree.getActionMap().get(actionId); if (action == null) { this.action.actionPerformed(event); } else { action.actionPerformed(new ActionEvent(tree, ActionEvent.ACTION_PERFORMED, actionId)); int row = tree.getLeadSelectionRow(); getSelectionModel().setSelectionInterval(row, row); TableUtil.scrollSelectionToVisible(TreeTable.this); } }