I have two tabs in my dialog. To each tab splitpane is attached. A common tree is displayed in left part of the splitpane in both the tabs. The tree performs two different functions in 1st tab and when in second tab.For this reason i am not able to attach a common treeSelectionListener. I want to add the treeSelectionListener when i will be doing some activity in the tree displayed in the 2nd tab. And when i go to back to the 1st tab the treeSelectionListener should be removed. Means Moving from 1st tab to 2nd tab the treeSelectionListener should be added Moving from 2nd tab to 1st tab the treeSelectionListener should be removed.
Please give me some example piece of code where adding and removing the treeSelectionListener is written. [ December 24, 2003: Message edited by: satya sahu ]