if (++next_out == queue.length) next_out = 0; return res; }
while (next_in == next_out) {      if (isDispatchThread()) {          if (isShutdown()) throw new InterruptedException();  tk.iterateNativeQueue(this, true); lastNativeQueueAccess = System.currentTimeMillis(); } else { try { wait(); } catch (InterruptedException ie) { } } }  AWTEvent res = queue[next_out];  if (++next_out == queue.length) next_out = 0; return res; }
  public synchronized AWTEvent getNextEvent()    throws InterruptedException  {		if (next != null)			return next.getNextEvent();		while (next_in == next_out)			wait();		AWTEvent res = queue[next_out];		if (++next_out == queue.length)			next_out = 0;		return res;	}