Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
lbrtchx@hotmail.com - 09 Aug 2007 20:37 GMT
Check out Marti Hall's examples at:
~
http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-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
Sabine Dinis Blochberger - 10 Aug 2007 09:33 GMT
>  Check out Marti Hall's examples at:
> ~
[quoted text clipped - 13 lines]
>  THanks
>  lbrtchx

Jtree.setRootVisible(false);
Signature

Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

lbrtchx@hotmail.com - 11 Aug 2007 14:54 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.