@Override
  public boolean dispatch(@NotNull AWTEvent e) {
    String message = myReported ? null :
                     myErrorFunction == null ? "AWT events are prohibited inside " + myActivityName + "; got " + e :
                     myErrorFunction.apply(e);
    if (message != null) {
      myReported = true;
      LOG.error(message);
    }
    return true;
  }
@Override
  public boolean dispatch(@NotNull AWTEvent e)