java - Simple way to wait for a method to finish before starting another one -


I am not familiar with Java threading at all :( I have this class, which is called when a new window (Draw () method). DrawGUI () finally calls a processing method (comparison method).

The structure is basically

 < Code> public static zero draw () (//) comparison of stuff ();}   

The problem is that processing (compare ()) in the window created by the picture (drawn)Until the end, some of the major scenes are of artwork.

What is the easiest way to implement the draw () after I finish ()? Thanks

The simplest method is just a asyncExec () Insert your draw () code inside

  New thread (New Runnabel) {public void run () {// long time Bg stuff stopping from running Dh while display.getDefault (). AsyncExec (New Runnabel) {Public Zero Run () {Draw ();}}}). Start ();     

Comments