Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How do you build a JTree with no root whatsoever (or its placeholder space)?

Reply
Thread Tools

How do you build a JTree with no root whatsoever (or its placeholder space)?

 
 
lbrtchx@hotmail.com
Guest
Posts: n/a
 
      08-09-2007
Check out Marti Hall's examples at:
~
http://www.apl.jhu.edu/~hall/java/Sw...ial-JTree.html
~
on the last example "5.2. Replacing the Icons: Result"
~
if you declare your root node like this:
~
root = new DefaultMutableTreeNode();
~
you wont get any label for the root object, but some space shows
there anyway
~
How do you rid the space too?
~
THanks
lbrtchx

 
Reply With Quote
 
 
 
 
Sabine Dinis Blochberger
Guest
Posts: n/a
 
      08-10-2007
wrote:

> Check out Marti Hall's examples at:
> ~
> http://www.apl.jhu.edu/~hall/java/Sw...ial-JTree.html
> ~
> on the last example "5.2. Replacing the Icons: Result"
> ~
> if you declare your root node like this:
> ~
> root = new DefaultMutableTreeNode();
> ~
> you wont get any label for the root object, but some space shows
> there anyway
> ~
> How do you rid the space too?
> ~
> THanks
> lbrtchx
>

Jtree.setRootVisible(false);
--
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu
 
Reply With Quote
 
 
 
 
lbrtchx@hotmail.com
Guest
Posts: n/a
 
      08-11-2007
> On Aug 10, 4:33 am, Sabine Dinis Blochberger <no.s...@here.invalid> wrote:
>
> Jtree.setRootVisible(false);
> --

~
Well, this would also erase the little lines representing connections
to the tree's "Root". Is there a way to only get rid of the space
left?
~
lbrtchx



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
JTree Selection lost when JTree looses focus jumpz Java 3 11-12-2007 03:55 PM
How to create a JTree with multiple root node? Allen Java 4 07-14-2006 12:54 AM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
Build control in a placeholder or like a placeholder nail ASP .Net Building Controls 0 09-10-2004 07:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57