I have the following Java code:
public static void main(String[] args)
{
new Thread(new MyRunnable()).run();
showGUI();
}
My problem is that the launch MyRunnableblocks the main thread, causing showGUIit to not be called until it finishes working. I would like the program to create spawn MyRunnableand let it work independently in the background, allowing the main thread to forget about it and go ahead and do what it wants (for example, call showGUI).
source
share