Is it possible to put an actionlistener on a tab in swing? If it is please could you post a small example?
The only way to do that is to add a javax.swing.event.ChangeListener to the JTabbedPane itself. You might have to keep track of the selected tab vs. previously selected tab depending on what you are doing with the state change...
javax.swing.event.ChangeListener