posted 15 years ago
I am trying to make a JEditorPane that the user can type anything in it, when they click a button, I parse the input and color some of the text red if the user mistyped something, so I insert html tags that set font color="red". The problem is when I call the setText method to update the data in the JEditorPane, I see the word "head" twice at the top with a box around each "head", then below that I see the html text that I expected. Has anyone else had this problem with the "head" at the top? Any ideas about how to get rid of the "head" part? Thanks!