Dynamically change JTabbedPane
Posted on 2006-04-23
I have a Jtree which gets populated from the database.on the right side i have 3 JTabbedPane which contains JTable inside it.the table also gets populated from the DB.Now i want to know how can i dynamically change the tab pane when i click on a tree nodes.for example.
-xxx xxx yyy zzz
when the frame is shown for the first time JTree only shows the root i.e. xxx and the tab pane shows the xxx pane.
now when i expand the xxx node the yyy tab should be shown.now again when i expand the yyy node the zzz pane should be shown.please help me to make this work,code example will be appreciated a lot.
thanks in advance