This doesn't work. ONLY inside the listener... someonde could explain this behaviour? And what can I do?
Joined: Sep 20, 2004
Well... Only after I solved the problem (with a crazy solution) I realized that the issue were that Java was doing "something" behind the scenes... and changing the caret position after the method was called (reseting my changes)
But a better solution (much better than the one I've invented) is to create a Thread, calling a short sleep:
So, when it's time to put the knob back, it's just write:
Finally!! I can rest in peace! (and in pieces)
subject: Programmatically set the knob position of a JScrollBar