tabbedPane.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { setSelectedTab(); } });
    private JTabbedPane createTabbedPane() {        JTabbedPane tabbedPane = new JTabbedPane();        // Adding the init window        tabbedPane.add(new InitPanel(this), "Init Window");        tabbedPane.addChangeListener(new ChangeListener() {            public void stateChanged(ChangeEvent e) {                setSelectedTab();            }        });        return tabbedPane;    }