views:

15

answers:

0

i want to display different Jpanel when different node is selected just like in a fileBrowser.My Jpanel has button controls.am using TreeselectionListerner and defaultMutableTreeNode.how can i display different panel for nodes in the same depth.each node corresponds to different objects .everyTime i create a node i pass the userObject to a Panelcreationing method.how do i set the text of the node when i pass the userObject.