Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Updating a dialog while reading a file

Avatar of cmp2
cmp2 asked on
22 Comments1 Solution282 ViewsLast Modified:
I have a dialog that starts up a new file reader object (that runs in a separate thread). That file reader object needs to update a textfield message box on the dialog as it progresses through the file. I tried  starting the dialog in new thread but the message box still doesn't update until the file reader object is done reading the file. Here's a code summary of what I have done:

Thread a;
Runnable run2 = new Runnable(){
    public void run(){
        //start up dialog that starts the file reader object (in another thread)

a = new Thread(run2);

Any ideas how I correctly update the textfield in the dialog from the different file reader object? Right now I pass a reference to the textfield to the file reader object.
Avatar of Mick Barry
Mick BarryFlag of Australia imageJava Developer
This problem has been solved!
Unlock 1 Answer and 22 Comments.
See Answers