Updating a jtree
tree.update UI(); works fine, but all nodes collapse, so i want to update only the changed node (or prevent the collapse-thing).
Edited list is sent to server(on the same machine actually, so it doesn't take to long), the window with list is closed but right before that the main window (with jtree) is told to refresh itself, and I can see that it does what is told in log output, but the changes don't show on the screen.Any subsequent node added with the following code is in fact stored in the That makes sense. Vector.insert Element At(Vector.java:571) at javax. Default Mutable Tree Node.insert(Default Mutable Tree Node.java:195) at javax.I had previously been updating through the Default Tree Model which I have saved in the UI class, I just ended up using the add on Default Mutable Tree Node because it was shorter. I believe that Child Count() will throw out of bounds exceptions (by believe, I mean I know from experience) on insert Node Into. Default Tree Model.insert Node Into(Default TreeModel.java:234) Quite likely you are having some threading issue. Each node in the Tree has several attributes, say, for example, Name, Type, Colour, Height. From this, you can select, Type, Colour, Height etc.You select 'Colour' and all the data from the tree is grouped into colours, a new tree is built and .... Hi all, after editing a node in a jtree, how do i refresh this node so that the changes appear immediately.