one additional query if root is also selected with child and only child should get deleted.
i am tring but facing
java.lang.IllegalArgumentException: node does not have a parent.
am i missing something?
Message was edited by:
Prashant_SDN
Message was edited by:
Prashant_SDN
> ..if root is also selected with child and only child should get deleted..
For each delete-candidate node x you could check if there is a delete-candidate node y
(other than x) that has node x in its PathToRoot-array ( DefaultTreeModel#getPathToRoot(y) ).
If yes, simply set the path of x to null, so you can skip the nulls later on.
Message was edited by:
Andre_Uhres
Message was edited by:
Andre_Uhres