void (@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) ); }