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 / December 2005

Tip: Looking for answers? Try searching our database.

How to write narray Tree? example pls

Thread view: 
sanny.h@gmail.com - 28 Dec 2005 02:10 GMT
Hi all,
      Thank you all for having this group.
       I am new to the world of java.
       I want to write a java program were the strings are stored in a
tree (not binary tree).
For example
1) "APPLE" -> "RED"
2) "APPLE" -> "WHITE"
3) "APPLE" -> "USA" ->"RED"
4)"APPLE" -> "USA" -> "WHITE"
5) "APPLE" -> "USA" -> "NYC" -> "RED" ............soon

So APPLE will have 3 child nodes (RED,WHITE,USA). Child node USA will
have 3 child nodes (RED,WHITE,NYC) , NYC has RED ......soon.

If not tree any other method that i can achieve this?

Thanks in advance.
sanny.
Andrey Kuznetsov - 28 Dec 2005 02:13 GMT
>       Thank you all for having this group.
>        I am new to the world of java.
[quoted text clipped - 11 lines]
>
> If not tree any other method that i can achieve this?

see TreeModel, DefaultTreeModel and JTree

Signature

Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities



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.