Every time (except first time) I set text in JEditorPane scrollbar jumps to the bottom of JEditorPane. Is there any way to avoid this? One way that I tried is to use setCare
The following solved the problem for me, after 50 minutes of despair:
JEditorPane.grabFocus(); JEditorPane.setCaretPosition(20);