7475767778798081828384
SwingUtilities.invokeAndWait(thread); if (!thread.result) { return false; } synchronized (listener) { listener.wait(maxWaitTime); } waitForIdle(); if (!c.isFocusOwner()) { fail(); }
101102103104105106107108109110111
122123124125126127128129130131132
public void run() { c.requestFocus(); } }); synchronized (listener) { listener.wait(maxWaitTime); } waitForIdle(); } /*
140141142143144145146147148149150
public void run() { c.requestDefaultFocus(); } }); synchronized (listener) { listener.wait(maxWaitTime); } waitForIdle(); } /*
159160161162163164165166167168169
c.requestFocus(temporarily); } }); synchronized (listener) { listener.wait(maxWaitTime); } waitForIdle(); if (!c.isFocusOwner()) { fail(); }
180181182183184185186187188189190
c.grabFocus(); } }); synchronized (listener) { listener.wait(maxWaitTime); } waitForIdle(); if (!c.isFocusOwner()) { fail(); }