Tree Implementation in Java ...

S

SGA

Hi,

I would like to create some sort of Tree on my website.(category with subcategories)

Data for a tree comes from flat table (ex.):

Cat Name Parent ID
--- ---- ---------
1 a
2 b
3 c
11 a1 1
12 a2 1
13 a3 1
21 b1 2
22 b2 2
111 a11 11
222 b22 22

Does anyone can help out with a java code for implementing tree in memory ?
I will need something that will "sort out" the table in memory and will allow
for showing it on my website ...

Thanks in advance!
Zeev.
 
B

BarryNL

SGA said:
Hi,

I would like to create some sort of Tree on my website.(category with subcategories)

Data for a tree comes from flat table (ex.):

Cat Name Parent ID
--- ---- ---------
1 a
2 b
3 c
11 a1 1
12 a2 1
13 a3 1
21 b1 2
22 b2 2
111 a11 11
222 b22 22

Does anyone can help out with a java code for implementing tree in memory ?
I will need something that will "sort out" the table in memory and will allow
for showing it on my website ...

How about javax.swing.tree.DefaultTreeModel? - any use?
 
T

Tom Cole

He said "website". I doubt he's looking to write a Java 1.2 applet. But
could be...

You want to look into JavaScript, not Java. That's a different form:

com.lang.javascript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,470
Messages
2,571,809
Members
48,797
Latest member
PeterSimpson
Top