Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

first character in JTextArea disappears??????  RSS feed

 
Sudha Lakshman
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i've a problem. i am using a JTextArea and there is a thread that is looking for an event to occur. While the thread is waiting for that event say waiting for text files, i display a message as follows
16-05-2002(12:00:00) Looking for text files.
the above message is repeated (displayed on the TextArea)after a sleep of about 1 second.
When the next message is diplayed it is temporarily displayed as
6-05-2002(12:00:01) Looking for text files.
and the "1" (the first characeter in the line)appears when the next message is displayed after 1 second.
what could be the problem???
i am using the setCaretPosition() method so that the vertical scroll bar scrolls to the new message. Could this be causing this problem???
please do let me know a solution for this ASAP.
thank you
regards
Sudha L
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sudha L,
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post some relevant example code in the simplest form possible to replicate your experience?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!