I have a tabbed panel including five tabs. This tabbed panel is on JPanelI use a button on the other JPanelto get the fourth tab as the main tab. But when I click on the button, the first tab is still displayed, and I have to go to the fourth manually. Any ideas. Thanks deeply.
Button action
Center instance1 = Center.getInstance();
instance1.doClickHistoryBtn();
doClickHistoryBtn () method
public void doClickHistoryBtn(){
history_btn.doClick();
}
When I execute this doClickHistoryBtn () method, the History_panel is loaded.
second JPanel (History_panel)
private JPanel history_panel1;
private JPanel history_panel2;
private JPanel history_panel3;
private JPanel history_panel4;
private JPanel history_panel5;
public History_panel()
{
initComponents();
setPanels();
}
private void setPanels(){
}

This is my first screen.
Expected

Actual

source
share