append() a string in TextArea vs. insertString on a Document in JTextPane

I was using append() in TextArea to display some messages. Then I changed it to JTextPane and use insertString with the Document because I need to have some messages in color.The messages came out all right. But they won't get displayed on the fly.

Can I make it display just like the behavior from the append() function with the TextArea?

[353 byte] By [chouannaa] at [2007-11-26 15:55:01]
# 1
Hi,Please ask Swing questions in the Swing forum. Kaj
kajbja at 2007-7-8 22:15:40 > top of Java-index,Java Essentials,Java Programming...