Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1303
| From | "Mark Holland" <mark.holland@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: How to lock a tree no |
| Message-ID | <eu94lo$3ml$1@news.freedom2surf.net> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1174928969.739815.32170@n59g2000hsh.googlegroups.com> |
| Date | 2011-04-27 15:32 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui >I have a DefaultMutableTreeNode that sometimes collapses on certain > hardware (like a trackball) when the mouse hovers over a child node > in > my JTree. > > How can I lock this one single node from collapsing? It's a root > node > that's hidden so that all the second level child nodes appear, > making > them look like multiple root nodes. You could attach a listener to your tree, and prevent any collapse events for the root node. The following link has a good example on how to use this feature. http://java.sun.com/docs/books/tutorial/uiswing/events/treewillexpandlistener.html Mark --- * 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 | Find similar | Unroll thread
Re: How to lock a tree no "Mark Holland" <mark.holland@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
csiph-web