Hi! I have added an action listener for a button. When i click this button it should go to the second tab in the tabbed pane which i have created. I have created two tabs as follows:
tab.addTab("Change Password", panel1);
tab.addTab("Add new User", panel2);
and the action listener for the button as follows:
class newuserListener implements ActionListener
{
public void actionPerformed(ActionEvent ev)
{
optionsGUI tx = new optionsGUI();
}
}
My problem is that when i click the button it goes to the first tab. How can i make it to go to the second tab when i click the button???