Re: JTree display update issue with new nodes - SOLVED



"qu0ll" <qu0llSixFour@xxxxxxxxx> wrote in message
news:451a94c4$0$15668$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"qu0ll" <qu0llSixFour@xxxxxxxxx> wrote in message
news:451a8fea$0$15669$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

<snip>

OK, thanks for that. I replaced my custom tree model with the default
and it works - mostly! Now the new nodes show up but for some reason
there is a blank "line" displayed in the tree like this:

Root
|
* Node
| |
| * Node
| |
| * Node
| <blank space>
* Node
|
* Node

Why the blank space? How do I get rid of it?

Further to this, I have found that if I remove the line of code to select
the new node, it works fine but I have to expand the parent node to see
the new node. Why would selecting the new node cause a blank line to
appear? I need to have the new node automatically selected.

Solved it! It seems that trying to select the new node before calling
nodesWereInserted() is a problem. So I moved the selection to after the
call and it works perfectly. Thanks for your help.

--
And loving it,

qu0ll
______________________________________________
qu0llSixFour@xxxxxxxxx
(Replace the "SixFour" with numbers to email)


.



Relevant Pages

  • Re: JTree display update issue with new nodes
    ... Now the new nodes show up but for some reason there is ... a blank "line" displayed in the tree like this: ... (Replace the "SixFour" with numbers to email) ...
    (comp.lang.java.gui)
  • Re: Tree view node selection
    ... I also tried selecting it by its name but no go. ... The node isn't highlighted for some reason. ... How do we select a tree view's node outside of a tree view event? ... is GetNodeAt but this seems to want the screen coordinates. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How can I exclude the "Notes" data when a GED file is extracted from FTM.
    ... place when you wrote the GED but for some reason they took it out. ... The process of selecting "Facts to import" doesn't allow you to choke ... The one I can't figure is that the Help file contains a page "Facts to ...
    (soc.genealogy.computing)
  • Re: Timeline
    ... I think!Family still has one of the nicest tree drawing capabilities ... all of it by selecting one member of same. ...
    (comp.sys.acorn.apps)
  • Please Help Me Understand This Bizarre Tree Entry Observation
    ... "tree") in one panel populated with directory name nodes. ... Logic for programmatically selecting a previously saved FullPath is ... When I tab into the tree control, ...
    (microsoft.public.dotnet.languages.csharp)