I want to create tree view dynamically in java.
I am using two tables to do so.
1.parent-child relationship table.
2.Main table
My parent- child relationship table.
Parent Child
--------------------
1 2
1 3
1 4
2 5
2 6
3 7
3 8
5 9
5 10
My Main table
Id Name
-------------------
1 one
2 two
3 three
4 four
5 five
6 six
7 seven
8 eight
9 nine
10 ten
I want to display treeview as follows
one
two
five
nine
ten
six
three
seven
eight
four
please help me how to implement this dynamically. Any help would be appreciated.