View Single Post
Old Jan 30th, 2007, 12:08 PM   #1
Riddick
Newbie
 
Join Date: Sep 2006
Posts: 14
Rep Power: 0 Riddick is on a distinguished road
JTextPane: omitting new line (\n) character

Hi i have some code that searches elements of a jtextpane from one element to another looking for key words. However when i get a new keyword from a new line, a new line character proceeds it.

At least i assume that's what happened because I concatenated my keywork with a proceeding 'before' and preceeding 'after' and it came out like this

before
forafter

instead of beforeforafter

is there any way to check and remove the new line character from the keyword or any way to prevent it happening.

Thanks.
Riddick is offline   Reply With Quote