posted 17 years ago
hi,
thanks for the reply. i understand the way how tree works and done some coding to find the solution.
What i understand is "to expand a specific node in the tree, we need to expand all its parent nodes". My problem is, i have object of the node which has to be expanded in hand. and i don't know ancestors of that node.
what i observed in JTree is,
1) we have to store all nodes of a tree in some where (like Map), becasue to search any node the JTree needs only that node object (not even new node object with the same data).
2) row numbers of tree nodes are not static. When we pass a row number to "expandRow(row)" method, suppose n, the tree will expand nth visible node from the root.
i solve my problem like below
And finally i came out of the tree expanding problem.
[ April 27, 2005: Message edited by: sasi kala ]