public void removeTab(AbstractTab tab) {
        tabContainer.removeTab(tab);

        if ( tabContainer.getTabCount() == 0 ) {
            menuBar.toggleConnectionActions(false);
            menuBar.toggleUserMenuBar(false);
            menuBar.togglePanelActions(false);
        }
    }