Mac OS X: Don't use invokeAndWait() if called from dispatch thread

This commit is contained in:
Elias Naur 2005-01-19 09:10:48 +00:00
parent a9df33627e
commit cc8f1d8fdd
1 changed files with 5 additions and 1 deletions

View File

@ -246,7 +246,11 @@ final class MacOSXFrame extends Frame implements WindowListener, ComponentListen
private void invokeAWT(Runnable r) {
try {
java.awt.EventQueue.invokeAndWait(r);
if (java.awt.EventQueue.isDispatchThread()) {
r.run();
} else {
java.awt.EventQueue.invokeAndWait(r);
}
} catch (InterruptedException e) {
// ignore
} catch (InvocationTargetException e) {