I have a JTextPane, but I have noticed that if I use .setText()
all tabs get removed.
To fix this I see two options:
- Make the tabs get set properly.
- Replace all tabs with the html special character
 
and then change the tab size in the JTextPane to match the width of the html tab.
I do not know how to do #1 so I am trying to use the crude hack #2.
So my question is, how do I change the tab size for JTextPane using an HTMLDocument, or how do I setText()
and not have tabs be removed?
Also I am using getText()
and setText()
in order to save the text inside the JTextPane.
Thank you in advance.