Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #854
| From | "Brandon McCombs" <brandon.mccombs@THRWHITE.remove-dii-this> |
|---|---|
| Subject | how to have empty nodes i |
| Message-ID | <45c18664$0$1414$4c368faf@roadrunner.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:29 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui It seems in Sun's infinite wisdom that a node in a JTree must have at least 1 child in order for there to be an expansion control next to the node. I don't want to load my tree structure all at once and so I'm getting each node's children a node at a time when it is either selected or expanded. But I still want the stupid expansion control so I'm creating a fake node temporarily. This does the job except that when a node is expanded for the first time I get a quick blink where the dummy node is being deleted before the real nodes show up. I don't know why this happens since I'm only reloading the tree at the selected node one time so I was wishfully thinking that I wouldn't even notice 1 node being removed and a bunch of others being added but I do. Do I have to go to the trouble of creating my own tree expansion listener (disable the listener, then remove the dummy node, reload the tree at the selected node, add the real nodes, then enable the listener and reload again?) just for this stupid little feature that should already be there? What can I do to fix it? thanks --- * 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 — Next in thread | Find similar
how to have empty nodes i "Brandon McCombs" <brandon.mccombs@THRWHITE.remove-dii-this> - 2011-04-27 15:29 +0000
Re: how to have empty nod "Michael Rauscher" <michael.rauscher@THRWHITE.remove-dii-this> - 2011-04-27 15:29 +0000
Re: how to have empty nod "Brandon McCombs" <brandon.mccombs@THRWHITE.remove-dii-this> - 2011-04-27 15:29 +0000
Re: how to have empty nod "Edwin Dankert" <edwin.dankert@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
Re: how to have empty nod "Brandon McCombs" <brandon.mccombs@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
Re: how to have empty nod "Rogan Dawes" <rogan.dawes@THRWHITE.remove-dii-this> - 2011-04-27 15:30 +0000
csiph-web