private void dockChatWindow()
    {
        JFrame chatWindow = m_chatPanel.getChatWindow(); 

        if (!b_chatWindowDocked)
        {
            if (chatWindow != null)
            {
                chatWindow.setVisible(false);
            }

            chatWindow.getContentPane().remove(m_chatPanel);
            if (b_pogWindowDocked)
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_mapPogSplitPane);
                GametableFrame.getGametableFrame().getContentPane().remove(m_canvasPane);
            }
            else
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_canvasPane);
            }
            GametableFrame.getGametableFrame().getContentPane().validate();
            GametableFrame.getGametableFrame().m_mapChatSplitPane.add(m_canvasPane, JSplitPane.TOP);
            GametableFrame.getGametableFrame().m_mapChatSplitPane.add(m_chatPanel, JSplitPane.BOTTOM);
            if (b_pogWindowDocked)
            {
                GametableFrame.getGametableFrame().m_mapPogSplitPane.add(m_pogsTabbedPane, JSplitPane.LEFT);
                GametableFrame.getGametableFrame().m_mapPogSplitPane.add(m_mapChatSplitPane, JSplitPane.RIGHT);
                GametableFrame.getGametableFrame().getContentPane().add(m_mapPogSplitPane, BorderLayout.CENTER);
            }
            else
            {
                GametableFrame.getGametableFrame().getContentPane().add(m_mapChatSplitPane, BorderLayout.CENTER);
            }
            GametableFrame.getGametableFrame().getContentPane().validate();
            repaint();

            b_chatWindowDocked = true;
        }
        else
        {
            if (chatWindow == null)
            {
                chatWindow = new JFrame();
                chatWindow.setTitle("Chat Window");
                chatWindow.setSize(800, 200);
                chatWindow.setLocation(195, 600);
                chatWindow.setFocusable(true);
                chatWindow.setAlwaysOnTop(true);
                m_chatPanel.setChatWindow(chatWindow);
            }
            chatWindow.setJMenuBar(getNewWindowMenuBar());

            if (b_pogWindowDocked)
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_mapPogSplitPane);
            }
            else
            {
                GametableFrame.getGametableFrame().getContentPane().remove(m_canvasPane);
            }
            GametableFrame.getGametableFrame().getContentPane().remove(m_mapChatSplitPane);
            GametableFrame.getGametableFrame().getContentPane().remove(m_chatPanel);
            GametableFrame.getGametableFrame().getContentPane().validate();

            if (b_pogWindowDocked)
            {
                GametableFrame.getGametableFrame().m_mapPogSplitPane.add(m_pogsTabbedPane, JSplitPane.LEFT);
                GametableFrame.getGametableFrame().m_mapPogSplitPane.add(m_canvasPane, JSplitPane.RIGHT);
                GametableFrame.getGametableFrame().getContentPane().add(m_mapPogSplitPane, BorderLayout.CENTER);
            }
            else
            {
                GametableFrame.getGametableFrame().getContentPane().add(m_canvasPane, BorderLayout.CENTER);
            }
            GametableFrame.getGametableFrame().getContentPane().validate();
            repaint();
            chatWindow.getContentPane().add(m_chatPanel);
            chatWindow.setVisible(true);

            b_chatWindowDocked = false;
        }
    }