java - Start swing gui in anouther thread different from main to update jtextarea while doing culculations -


my program starts @ moment

          public static void main(string[] args){           new gui().setvisible(true);          new program();   } 

i using jtextarea display results. have method in gui display(string). appends text jtextarea. call display(string ) program display result. have methods in program work , call method display @ end of execution program method. if call display(string) @ beginning of execution not display in jtextarea untill method of program finishes. not updating gui. think need use invoklater , new runnable start edt gui how in main new program. whould solution problem? thank help.

p.s. did googled can't how it. last resource

a big thing seems overlooking: actual quote swing documentation jtextarea.append:

this method thread safe, although swing methods not. please see how use threads more information.

so seems swingutilities.invokelater should have nothing this. don't know what's causing problem. if post code, might able more.

p. s: have put comment, not have reputation so.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -