Currently I am having two panels with one JTree on left panel and another JTree on right panel. When I click a node of left JTree and click a move button then it will move to the right JTree. I am now able to make this. But now I am having a new requirement in the right panel there should be two options one is JTree and another is JTable. If JTree option is clicked then JTree should display the content or else if JTable is clicked then JTable should display the same content.

So kindly give me a solution for this. Is there a way for updating JTree and JTable with a same model. Or give me any other idea regarding this issue.

Thank you.