public synchronized static void appendTextPane(Color color, String message, JTextPane box)
    {
        StyledDocument doc = box.getStyledDocument();
        Style style = box.addStyle("style", null);
        /*if (color == null) {
            color = new Color(255, 255, 255);
        }*/
        StyleConstants.setForeground(style, color);
        box.setCaretPosition(doc.getLength());
        try {
            doc.insertString(box.getCaretPosition(), message, style);
        } catch (BadLocationException e) {
            e.printStackTrace();
        }
        box.setCaretPosition(doc.getLength());
        try {
            cleanUpChat(box);
        } catch (BadLocationException e) {
            e.printStackTrace();
        }
    }