I'm writing a basic chat (or rather I've written) server/client pair. Now I want to make the username appear in a different color and font style than the stuff the users are saying, and I want URLS to turn into links that will launch the webBrowser. I started out with a JTextArea, and then when I tried to upgrade to a JEditorPane that supports HTML text - but then the message section of the window was just blank.
The code:
Basically an append. As far as I can see this should have worked, but since it didn't I must be missing something.
Thoughts?
The code:
Code:
jTextPane.setText(jTextPane.getText() +
"<b><font color="blue"><" + userName + ">:</font></b>");
Basically an append. As far as I can see this should have worked, but since it didn't I must be missing something.
Thoughts?