I have a JTextPane and I am able to modify the style of a portion of text within it.
Assuming that nothing in the JTextPane is selected, I would like to be able to modify the style of a portion that is not yet in it, that is to say, to set the style that the user is going to type next.
Using setCharacterAttributes(start, length, style, attributeSet, replace) with length = 0 does not seem to do it.