I would like to change selected JTabbedPane "Calculation" after click on the button responsible for calculation with Action Listener to TabbedPane "Results".
            Asked
            
        
        
            Active
            
        
            Viewed 207 times
        
    3
            
            
        - 
                    duplicate of [How to switch tabs in jTabbedPane by clicking a Button?](http://stackoverflow.com/questions/4157293/how-to-switch-tabs-in-jtabbedpane-by-clicking-a-button) – Maximin May 08 '13 at 10:52
 
2 Answers
1
            
            
        I think, you can use .setSelectedIndex(index), or .setSelectedComponent(component). Try to read javadoc :)
        Bernard Burn
        
- 661
 - 5
 - 20
 
1
            class ButtonHandler implements ActionListener{
       public void actionPerformed(ActionEvent e){
              jtp.setSelectedIndex(0);
       }
}
here jtp is the object of JTabbedPane. 
Have a look in JTabbedPane for further details.
        Maximin
        
- 1,655
 - 1
 - 14
 - 32