@Override
            public void componentAdded(ContainerEvent e) {
                int index = tabbedPane.getSelectedIndex();
                if (index == -1) return;

                ChannelPanel channel = (ChannelPanel) tabbedPane.getComponentAt(index);


                if (index == 0) {
                    moveTabLeft.setForeground(Color.gray);
                    previousTab.setForeground(Color.gray);
                } else {
                    moveTabLeft.setForeground(Color.black);
                    previousTab.setForeground(Color.black);
                }
                if (index == tabbedPane.getTabCount() - 1) {
                    moveTabRight.setForeground(Color.gray);
                    nextTab.setForeground(Color.gray);
                } else {
                    moveTabRight.setForeground(Color.black);
                    nextTab.setForeground(Color.black);
                }
                channel.updateTabInfo();
            }