I'm using a JTabbedPane in my application and I listen to its changes with ChangeListener so that I can know which tab is currently selected. So my stateChanged method is;
ChangeListener
stateChanged
public void stateChanged(ChangeEvent ...