private void showMessage(){
        try {
            String[] tokens = inputText.split("\002");
            String newText;
            if(whisper){
                String receiver = (String)sendToCombo.getSelectedItem();
                newText = "\n" + "( TO "+ receiver + " )"+client.username + " :";// + inputText;
            }
            else{
                newText = "\n" + client.username + " :";// + inputText;
            }
            dialogTextPane.setCaretPosition(dialogTextPane.getStyledDocument().getLength());
            dialogTextPane.getStyledDocument().insertString(dialogTextPane.getCaretPosition(), newText, null);
        
            for (String token : tokens) {
                if (token.length() == 0) continue;
            
                String[] subTokens = token.split("\003");
                String type = subTokens[0];
                System.out.println(type);
                String content = subTokens[1];
                System.out.println(content);
            //StyledDocument doc = dialogTextPane.getStyledDocument();
                
                dialogTextPane.setCaretPosition(dialogTextPane.getStyledDocument().getLength());
                if (type.equals("m")) {
                    //doc.insertString(doc.getLength(), content, null);
                    dialogTextPane.getStyledDocument().insertString(dialogTextPane.getCaretPosition(), content, null);
                }
                else if (type.equals("p")) {
                    dialogTextPane.insertIcon(new ImageIcon(content));
                }
                else {
                    System.out.println("WRONG MESSAGE QQQQQQQQQQQQQQQQQQQQ");
                }
            }
        }
        catch (BadLocationException ex) {
            System.out.println("BAD LOCATION QQQQQQQQQQQQQQQQQQQQ");
        }
    }