Java JEditorPane Format

Posted by ikurtz on Stack Overflow See other posts from Stack Overflow or by ikurtz
Published on 2010-04-27T12:38:43Z Indexed on 2010/04/27 12:43 UTC
Read the original article Hit count: 453

Filed under:
|
|

im trying to implement a Chat feature in my application. i have used 2 JEditorPane. one for holding chat history and the other for sending chat to the previous JEditorPane.

the JEditorPane is text/html type.

the problem i am having is when i put more than one space between characters it is automatically removed by the parser because it is HTML!

how can i make it so, that the spaces are not stripped?

example: hello world

becomes: hello world.

also i am having to parse the html tags so the new messages can be added to the history window.

is there a better option than using JEditorPane? if i used JTextPane would it be easier to implement?

i would like the chat boxes/panes to be able to handle bold, URL embedding for now.

thank you and look forward to your guidance.

© Stack Overflow or respective owner

Related posts about java

Related posts about jeditorpane