Home arrow static arrow Java Programming [Archive] - DefaultMutableTreeNode traversing
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - DefaultMutableTreeNode traversing
This topic has 1 reply on 1 page.

Posts:6
Registered: 10/24/02
DefaultMutableTreeNode traversing  
Jul 8, 2004 12:39 AM



 
Hi,

I display a DefaultMutableTreeNode data structure in a jsp with the preorderenumeration. How can I skip all childnodes of a node ? Only the childnodes...the next node which is on the same level should be displayed.... is there something in the api to skip all childnodes of a node ?
 

Posts:18,384
Registered: 21.03.00
Re: DefaultMutableTreeNode traversing  
Jul 8, 2004 3:41 AM (reply 1 of 1)



 
Hi,

No, but you can always check if you should skip them.

if (node.isNodeAncestor(nodeToSkipChildrenFor)) {
continue;
}

/Kaj
 
This topic has 1 reply on 1 page.