Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8379471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:11:46+00:00 2026-06-09T16:11:46+00:00

Possible Duplicate: How I append text to textarea with using swingworker class? I append

  • 0

Possible Duplicate:
How I append text to textarea with using swingworker class?

I append my jtextarea many lines in for loop. When i add lines , I dont see any line on text but when the for loop finish all of them is showing up. How can I see the every each line one by one ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:11:47+00:00Added an answer on June 9, 2026 at 4:11 pm

    Don’t execute your process in the Event Dispatching Thread, it blocks the repaint updates from occurring.

    You should make use of the SwingWorker API

    Also, take a look at

    • Concurrency in Swing

    Let me guess what you’re doing

    while (doSomeWork) {
       // do some processing
       textArea.append(someText);
    }
    

    Or possibly a for loop

    And you’re, some how expecting the UI to magically be updated?

    Unfourtantly, as much as I would love it to work like that, it doesn’t work that way.

    In order for the screen to be updated, you must allow the Event Dispatching Thread to continue running, so it can handle repaint requests (& a bunch of other important things), you need to off load your processing to another thread.

    No, there isn’t any other way to it, & the easiest way is to use the SwingWorker

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: writing many files in a for loop using R I am trying
Possible Duplicate: In Java, what is the advantage of using BufferedWriter to append to
Possible Duplicate: pass inputbox value as a querystring to URL <input name=KeywordBox class=BasicSearchInputBox type=text
Possible Duplicate: Python list append behavior Why does this code: x = [[]]*3 x[0].append('a')
Possible Duplicate: How to append data to a file? Quick question here, how can
Possible Duplicate: Python : how to append new elements in a list of list?
Possible Duplicate: Is it possible to append to innerHTML without destroying descendants' onclick functions?
Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument def f(a, L=[]): L.append(a)
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: Why is String.Concat not optimized to StringBuilder.Append? One day I was ranting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.