I am trying to change the text of one word in a sentence and populate it to a JTextArea (Java Swing).
I have tried splitting the sentence based on white space to an array of words:
String[] words = message_textArea.getText().split(" ");
Then finding the starting and ending index of my word to use with SpannableString , but this only appears to be available with the android SDK.
Is there a alternative to the SpannableString in the java SDK? If not is there a means to change the colour of one word in a sentence in the java SDK?
Thanks