if (EventQueue.isDispatchThread ()) throw new IllegalThreadStateException ("Robot: waitForIdle called from " + "the event dispatch thread");  EventQueue q = Toolkit.getDefaultToolkit ().getSystemEventQueue ();  while (q.peekEvent () != null) { try { wait (); } catch (InterruptedException e) { System.err.println ("Robot: waitForIdle interrupted"); } }
  public void waitForIdle()  {  }