Re: Building a tree (data structure) with Java.

1999-01-08 Thread mlorton
> How about using JTree? That's what we use to store our trees, though > I'm not certain how suitable they are to standard graph-theoretic > algorithms. JTree is a UI element. You could use DefaultTreeNode, I suppose. > On Fri, 8 Jan 1999, dog wrote: > > thomas down wrt: > > > I

Re: Building a tree (data structure) with Java

1999-01-08 Thread Martin FUZZEY
What about javax.swing.DefaultMutableTreeNode This is a purely data model class - ie it is not restricted nor linked to visual trees On Fri, Jan 08, 1999 at 05:07:08PM +0530, Karthik Vishwanath wrote: > HI all, > I need to generate a tree structure in my Java app. The size of > the tree ca

Re: Building a tree (data structure) with Java.

1999-01-08 Thread Dimitris Vyzovitis
> That solution would work fine, of course. The alternative is a > `linked tree' structure. Binary trees are easy (just store each > node's left and right children, and probably the parent). Trees > with arbitrary numbers of branches are a little more complex. My > preferred solution is for ea

Re: Building a tree (data structure) with Java.

1999-01-08 Thread dog
thomas down wrt: > > I need to generate a tree structure in my Java app. The size of > > the tree cannot determined until runtime. THe idea i have is to store the > > tree as an array using the Vector class. Before i start implementation, i > > want to ask if there is an alternative approach t

Re: Building a tree (data structure) with Java.

1999-01-08 Thread Thomas Down
On Fri, Jan 08, 1999 at 05:07:08PM +0530, Karthik Vishwanath wrote: > HI all, > I need to generate a tree structure in my Java app. The size of > the tree cannot determined until runtime. THe idea i have is to store the > tree as an array using the Vector class. Before i start implementation

Building a tree (data structure) with Java.

1999-01-08 Thread Karthik Vishwanath
HI all, I need to generate a tree structure in my Java app. The size of the tree cannot determined until runtime. THe idea i have is to store the tree as an array using the Vector class. Before i start implementation, i want to ask if there is an alternative approach to this? Thanks, Kart