How to get JTree-Node Values Returned?

I'm having problems in getting the value of JTree Nodes.How can a JTree Node return its value.Regards Kamran
[130 byte] By [Kami_Pakistana] at [2007-10-1 14:52:47]
# 1
In the event handler, determine which node is selected by invoking the tree's getLastSelectedPathComponent method. Use the getUserObject method to get the data associated with the node.
uhranda at 2007-7-10 18:43:44 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...
# 2
Thanks for Ur help!!
Kami_Pakistana at 2007-7-10 18:43:44 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...
# 3
How can i get the values even without any event being triggered. What i need is to get a node value when i just have a tree object which has the entire tree.
Venkatesh.Bojana at 2007-7-10 18:43:44 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...