Life is 10% what happens and 90% how you react to it.
Attitude is everything.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Derek Boring:
I've tried comparing the UserObjects of the nodes too and still the same story.
Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Originally posted by Derek Boring:
I need to know how to clear all the nodes out of an entire tree without loosing the root node. (i.e. remove all children from the root node) I tried rootNode.removeAllChildren() but it doesn't work, all the children are still in the tree but no longer connected to the root node. Logically this seems to be the correct functionality for this method
Originally posted by Derek Boring:
Is there a better way to do this? or do I need to modify my code to create a new JTree every time I want to clear it?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Originally posted by Derek Boring:
I was using is rootNode.removeAllChildren() This however leaves the nodes in the tree, they are just not connected to anything.
It seems like what you guys are saying is I need something like this:
And then call:
Look correct?
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |