JTree

I have a JTree which has parent and child nodes. When i add a child node to a parent node the node is getting added. I want to retrieve the parent node of this child node. Its like every parent node has an id associated with it in the database. now when a child node gets added to its parent i need to assign the id of the parent to this child node in the database. can someone help me out?
[392 byte] By [kirtipriyanka] at [2007-11-20 11:48:03]
# 1 Re: JTree
If indeed your problem was how to ask which node is parent of this node... You could have the items in your tree implement the TreeNode interface, or extend the DefaultMutableTreeNode. This grants you methods directly for asking parentage etc.
Londbrok at 2007-11-10 2:14:02 >