basic tree structures, populating from a result set
1 posts in topic
Flat View  Flat View

Posted By:   Jonathan_Cowperthwaite
Posted On:   Wednesday, June 20, 2001 04:27 PM

What would be a recommended way to translate a large result set of data into a tree structure, where a node can have one partent and many children?

the underlying table represents the stucture in the format

object | object's parent

i have represented my tree with an object that contains a reference to its parent and an array of references to its children.

i can order my result set. and i can know my parent and if necessary all children ( from a denormalized table )

Re: basic tree structures, populating from a result set

Posted By:   John_Zukowski  
Posted On:   Friday, June 22, 2001 07:54 AM

Consider using the model behind the Swing JTree. It allows you to easily represent the data without having to creating the framework yourself.
About | Sitemap | Contact