When I try to change color of a JTextArea using
textArea.setText("<html> <font color=\"red\"> Hi </font></html>")
, the text is shown is basically the whole text written inside setText method. But similar things work for JLabel, JButton etc.
How can I do that for a JTextArea also?