Any Java experts?

I'm having a bit of trouble with a Swing app I'm building. It consists of a JTabbedPane which contains, in each tab, another JTabbedPane and within each of those tabs, a class which extends JPanel.
What I'd like to do is be able to switch a tab automatically, ie, changing the tab in the outer tabbedpane and then changing to one in the inner tabbed pane.
How would I refer to these outer tabbed panes from within the JPanels? I'm at a bit of a loss - I'm assuming I'd need to mess around with action events, but I have no idea where I'd set them up so they're accessible to the panel classes.
Thanks,
David.
What I'd like to do is be able to switch a tab automatically, ie, changing the tab in the outer tabbedpane and then changing to one in the inner tabbed pane.
How would I refer to these outer tabbed panes from within the JPanels? I'm at a bit of a loss - I'm assuming I'd need to mess around with action events, but I have no idea where I'd set them up so they're accessible to the panel classes.
Thanks,
David.