question: private void navigateToChild ( String startsWith ) { TreePath currentPath = tree . getSelectionPath ( ) ; DefaultMutableTreeNode dumpNode = ( DefaultMutableTreeNode ) currentPath . getLastPathComponent ( ) ; Enumeration childs = dumpNode . children ( ) ; TreePath searchPath = null ; while ( ( searchPath == null ) && childs . hasMoreElements ( ) ) { DefaultMutableTreeNode child = ( DefaultMutableTreeNode ) childs . nextElement ( ) ; String name = child . toString ( ) ; if ( name != null && name . startsWith ( startsWith ) ) { searchPath = new TreePath ( child . getPath ( ) ) ; } } if ( searchPath != null ) { tree . makeVisible ( searchPath ) ; tree . setSelectionPath ( searchPath ) ; tree . scrollPathToVisible ( searchPath ) ; } }
target:  navigate to child of currently selected node with the given prefix in name