I have a String of random characters without spaces with a length of 50.000-1.000.000. I want to display the text in a JTextPane with spaces after each 10 characters:
FGHTYTREDE FRTYHTGCZV GTYHYHJHBF...
The user needs to be able to insert characters within the String.
Therefore I don't want to insert spaces into the String as it would take some time to update the text each time.
Instead is it possible to change the display settings of the JTextPane accordingly?
No. You will have to implement your own JComponent
or JPanel
to do this.