Method 'repaint' does not work an jTextArea
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Juergen_Havermann
Posted On:   Monday, April 8, 2002 07:46 AM

I want to fill a jTextArea with from some threads generated text. Everytime, a thread terminated his work, the text should be written in the jTextArea und immediately visibly. The Problem is, that the text appears only after all threads stop work. What should I do? My code in the run() method (frame is a object of my JFrame-extended class: frame.updateText(thread_generated_text); My method in de JFrame-extended class: void updateText(String text) { jTextArea1.append(text); jTextArea1.repaint();}    More>>

I want to fill a jTextArea with from some threads generated text. Everytime, a thread terminated his work, the text
should be written in the jTextArea und immediately
visibly.



The Problem is, that the text appears only after all
threads stop work.



What should I do?



My code in the run() method (frame is a object of my
JFrame-extended class:


frame.updateText(thread_generated_text);




My method in de JFrame-extended class:


void updateText(String text) {

jTextArea1.append(text);

jTextArea1.repaint();}

   <<Less
About | Sitemap | Contact