private void addTab() {
        if (!GUI.sortTabsAlphabetically)
            GUI.getTabbedPane().add(ChannelPanel.this, ChannelPanel.this.title);
        else {
            int selection = -1;
            for (int i = 0; i < GUI.getTabbedPane().getTabCount(); i++) {
                if (GUI.getTabbedPane().getTabCount() == 1) break;
                ChannelPanel c = (ChannelPanel) GUI.getTabbedPane().getComponentAt(i);
                if ((c.title.equals(c.connection.title))) continue;
                if (ChannelPanel.this.title.compareTo(c.title) <= 0) {
                    selection = i;
                    break;
                }
            }
            if (selection == -1) {
                GUI.getTabbedPane().add(ChannelPanel.this, ChannelPanel.this.title);
            } else {
                GUI.getTabbedPane().add(ChannelPanel.this, selection);
                GUI.getTabbedPane().setTitleAt(selection, title);
            }
        }
        if (GUI.focusNewTab) GUI.getTabbedPane().setSelectedComponent(ChannelPanel.this);
    }