2011-01-23, 06:11 PM
The setCaretPosition() thing might work. My only concern with that is that the JTextArea in question is set to be uneditable, so there's no (visible) caret. I assume it still tracks the location of where it would be, though. As for the synchronization comment, I don't know exactly what you mean by that but it isn't random - the behavior is entirely predictable. Odd, but predictable. And the first thing you mentioned - I assume by that you mean have the listener thread somehow tell the main thread to do the setText() call rather than doing it itself. The problem there is that I don't know how. Are there special methods within the Thread class for doing things like that?

