Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coding question
#3
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?
Reply


Messages In This Thread
Coding question - by Lord Xela - 2011-01-23, 05:30 PM
Coding question - by Nikkey - 2011-01-23, 05:45 PM
Coding question - by Lord Xela - 2011-01-23, 06:11 PM
Coding question - by Spaz - 2011-01-23, 08:43 PM
Coding question - by Lord Xela - 2011-01-23, 09:09 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)