Hi all ,
I had created a Document using jTextPane which I will use as a Template to create customize ones .
For eg :
I will create something like this in a Document using jTextPane
and I will open this Document in another jTextPane to replace <name> with a user input word(say John) using inserString method of StyledDocument .
Everything is fine expect that I lost format of that (<name>) which I set in previously created Document .That is it's font attributes (bold ,italic ,underline style) are all changed to plain .
This is what I getting :
and this is what I'm expecting :
Can any one tell me how to do that . That is replacing the word with out losing styles ?
Thanks in advance