JTextPane color, or other text component?

i am trying to get just one line of text in a JTextPane to be a different color than all of the other lines, i tried setting the foreground color, but that changes that line to.
[184 byte] By [dz0004455a] at [2007-11-27 9:59:07]
# 1
You need to change the attributes for that line of text. This posting has a simple example: http://forum.java.sun.com/thread.jspa?forumID=57&threadID=342068
camickra at 2007-7-13 0:30:01 > top of Java-index,Desktop,Core GUI APIs...
# 2
umm... i dont get the editor kit stuff, can u explain
dz0004455a at 2007-7-13 0:30:01 > top of Java-index,Desktop,Core GUI APIs...
# 3

I posted my response at 10:07. You replied at 10:10, which means you took less than 3 minutes to look at all the replies and that posting and run the demo code and understand what it does.

No wonder you don't understand, you can't even take time to try and figure it out.

The example code given there was based on the code from the Swing tutorial. Did you even bother to read the JTextPane API? Did you bother to follow the link to the Swing tutorial on "Text Component Features"?

Learn how to do some simple problem solving yourself and don't expect people to spoon feed the answers to you. I don't know what more you expect than a working example.

camickra at 2007-7-13 0:30:01 > top of Java-index,Desktop,Core GUI APIs...