Hi all,
I am using a JTabbedPane and in the changeListener(), I have the code to do some operation if the selected tab name is of a particluar name. But the stateChanged() method is called multiple times for a single selection. Any idea of how to restrict this?
Here is my code -
---------------------------------------------------------------
tabPane.addChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent arg0) {
String tabName = tabPane.getTitleAt(tabPane.getSelectedIndex());
if (//condition)
{
// do some operation
}
}
----------------------------------------------------------------
Please clarify!
thanks in advance!!
});