Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3975
| From | "pelakh" <pelakh@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: JTree - subnode not a |
| Message-ID | <52e91f8e-f405-4781-8347-824924d07b29@d77g2000hsb.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <nospam-87B10E.01291813082008@aioe.org> |
| Date | 2011-04-27 15:48 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Well, the EDT was not it, but looking through the example code you sent me, I was able to find my solution - instead of adding directly to the node, I used the DefaultTreeModel.insertNodeInto() method, which generated the proper NodesInserted events to keep the tree consistent. Thanks! On Aug 13, 1:29=A0am, "John B. Matthews" <nos...@nospam.invalid> wrote: > pelakh: Daniele is right. I was looking at the tutorial, and the demos > do precisely that in via invokeLater(): > > <http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html> > <http://java.sun.com/docs/books/tutorial/uiswing/examples/zipfiles/compon= ents-TreeDemoProject.zip> > > Looking closer, I see DefaultMutableTreeNode is not thread safe: > > <http://java.sun.com/javase/6/docs/api/javax/swing/tree/DefaultMutableTre= eNode.html> > > -- > John B. Matthews > trashgod at gmail dot com > home dot woh dot rr dot com slash jbmatthews --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Find similar
JTree - subnode not added "pelakh" <pelakh@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
Re: JTree - subnode not a "Daniele Futtorovic" <daniele.futtorovic@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
Re: JTree - subnode not a "John B. Matthews" <john.b..matthews@THRWHITE.remove-dii-this> - 2011-04-27 15:47 +0000
Re: JTree - subnode not a "pelakh" <pelakh@THRWHITE.remove-dii-this> - 2011-04-27 15:48 +0000
csiph-web