void () { for (int i = 0; i < myWizardTree.getRowCount(); i++) { TreePath path = myWizardTree.getPathForRow(i); if (getTreeStep().isSelectable(path.getLastPathComponent(), extractUserObject(path.getLastPathComponent()))) { myWizardTree.setSelectionPath(path); break; } } }