help in test fields

I am trying to insert a string in to a textfield with black as the foreground color. Then i am trying to highlight a single character in the string with a different color, ex:blue.

below is the code i am using but unable to get the character highlighted.

jTextField1.setSelectedTextColor(java.awt.Color.blue);

jTextField1.setSelectionEnd(4);

jTextField1.setSelectionStart(2);

i am not sure if this is the correct way. Can any one help me on how to do it or where can i get the information i need

thankyou

[547 byte] By [chilukaa] at [2007-9-30 2:20:46]
# 1
Read this section from the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/text.html]Using Text Components[/url].
camickra at 2007-7-16 13:29:54 > top of Java-index,Archived Forums,Swing...