What's the difference between this
conversationPane.setText(msg + conversationPane.getText());
and this?
conversationPane.setText(conversationPane.getText() + msg);
I know thah the second line does not print the message but Why!? I'm making a chat and the new messages should appear below the previous message (Like in a normal chat) but with the first line the new messages appear up all the conversation.
I use JEditorPane whith content type HTML because the chat contents smileys and this things, if I change the content type to textPlain the second line works perfectly.
I'm looking for the solution and find things with insertString using a Document and Attributes but I don't undestand how used and if this can solve my problem.