Java Programming - how to know current panel

I have created three tabs, each tab has a jpanel and each jpanel has various components like textfield, checkbox and radiobutton, where user inputs data.

These tabs are finally added to a top panel and to jframe. this frame also has a save button.

tabbedPane =new JTabbedPane();

tabbedPane.addTab("Network", networkPanel );

tabbedPane.addTab("Process", processPanel );

tabbedPane.addTab("Misc", miscPanel );

topPanel.add( tabbedPane, BorderLayout.CENTER );

The save button is common to all tabs. I may navigate through all these panels. Now my question is how do i know in which panel i am in. Is there any method that returns current panel.

[902 byte] By [ArpanaKa] at [2007-11-26 23:11:23]
# 1
just check the javadocthe tabbedPane.getActiveTab() should return the value you need
mimi_tan1985a at 2007-7-10 14:08:18 > top of Java-index,Java Essentials,Java Programming...
# 2
Judging by the javadocs for the JTabbedPane, it would have to be something like this:JPanel panel = (JPanel) tabbedPane.getComponentAt(tabbedPane.getSelectedIndex());
gimbal2a at 2007-7-10 14:08:18 > top of Java-index,Java Essentials,Java Programming...