Re: JTree display update issue with new nodes - SOLVED
- From: "qu0ll" <qu0llSixFour@xxxxxxxxx>
- Date: Thu, 28 Sep 2006 01:34:31 +1000
"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)
.
- References:
- JTree display update issue with new nodes
- From: qu0ll
- Re: JTree display update issue with new nodes
- From: Bart Cremers
- Re: JTree display update issue with new nodes
- From: qu0ll
- Re: JTree display update issue with new nodes
- From: qu0ll
- JTree display update issue with new nodes
- Prev by Date: Re: JTree display update issue with new nodes
- Next by Date: Re: JTree display update issue with new nodes
- Previous by thread: Re: JTree display update issue with new nodes
- Next by thread: Re: JTree display update issue with new nodes
- Index(es):
Relevant Pages
|