I want to use a JTextArea or JTextPane as a code change player, and the code changes and caret movements are recorded in a text file. But the problem is, it's recorded from an editor which supports multi selection, so there are more than one caret positions at one time.
Is it possible to show multiple carets in JTextArea or JTextPane?
I tried to use JTextPane and render the code as HTML, and inserted some <span class='caret'>|</span>
into the code to represent the carets, it works but the fake caret takes space, so the normal characters are not fixed on screen when caret changes.