Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Updates to JTextArea - not synchronized to console out

843806Feb 1 2008 — edited Feb 1 2008
Hello,

the snipped below read a buffer reader input and prints the output to the system out and appends a JTextArea.

While the debug output on the console updates as the lines get read the JTA effectively "freezes" until after the loops finished. Any idea how to redraw/sync the JTA with the console update so that it shows as "being updated"?

Many thanks,

R.
while (true) {
                String line = br.readLine();
                if (line == null) {
                    break;
                }
                System.out.println(line);
                out.appendJTA(line + "\n");
                
            }
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 29 2008
Added on Feb 1 2008
3 comments
125 views