Class EventQueue
In the same order as they are enqueued.
That is, if AWTEvent A is enqueued to the EventQueue before AWTEvent B then event B will not be dispatched before event A.
https://docs.oracle.com/javase/7/docs/api/java/awt...try {
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
new TApplication();
System.out.println("invokeAndWait");
}
});
} catch (InterruptedException e) {
e.printStackTrace();
} catch (Exception e) {
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else {
cause.printStackTrace();
}
}