> I'm running into a problem reseelcting a newly inserted node into a
> tree, performing a reload()
Bzzzt, game over. Doing a reload() on a JTree is an almost 100% sure
indication that you got the event handling between the JTree and its
model wrong. Very wrong.
> In order to make sure the user objects in the tree properly
> reflect the changes to the database it is much safer for me to refresh
> the whole tree which calls reload on the tree model.
It's not saver, it is simply wrong.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
jozeph78 - 15 Dec 2005 16:22 GMT
True but I'm certainly not going to rewrite this 6000line class when my
company isn't a big fan of refactoring. Wrong or not, I can't change
their refreshTree method which calls reload.
I guess I'll have to do the tree node manipulation manually instead of
calling refreshTree. I think we do have some insert<Object> for
inserting the object types as nodes into the tree. Hopefully it won't
be too painful.
Thanks for saving me a bunch of time trying to do something that's
otherwise impossible. I really appreciate it.