Home arrow static arrow Java Programming [Archive] - tree formed from database
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - tree formed from database
This topic has 1 reply on 1 page.

Posts:18
Registered: 1/12/04
tree formed from database  
Aug 2, 2004 3:31 AM



 
I have a table of values stored similar to this,

BaseNumber Name UniqueNumber

null Parent 1
1 Child 2
1 OtherChild 3
2 grandchild 4

In the above table a 'null' value in BaseNumber signifies that an entry has no 'parent'. 'Child' has a BaseNumber of '1', meaning that it is the child of the entity with UniqueNumber '1'. This data grows dynamically, and it might be expected to consist of up to 3000 entries.

My problem is that i want to display this information visually as a tree of sorts. There is an example of the sort of tree display i am looking for shown in the jdsk folder, but, having browsed the code and almost understood it, i can't see how to enter the children under the correct parent. From what i can see the example i have been looking at places its child nodes randomly instead of specifiying what values go where.

Can anyone help?
yours,
Michael

 

Posts:13,250
Registered: 24/10/97
Re: tree formed from database  
Aug 2, 2004 6:05 AM (reply 1 of 1)



 
http://forum.java.sun.com/thread.jsp?thread=543178&forum=31&message=2636083
 
This topic has 1 reply on 1 page.