@Override
  public void performWhenNoDeferredOutput(@NotNull Runnable runnable) {
    ThreadingAssertions.assertEventDispatchThread();
    if (!hasDeferredOutput()) {
      runnable.run();
      return;
    }
    if (mySpareTimeAlarm.isDisposed()) {
      return;
    }
    if (myJLayeredPane == null) {
      getComponent();
    }
    mySpareTimeAlarm.addRequest(
      () -> performWhenNoDeferredOutput(runnable),
      100,
      ModalityState.stateForComponent(myJLayeredPane)
    );
  }
@Override
  public void performWhenNoDeferredOutput(@NotNull Runnable runnable)