void (AWTEvent event) { try { var isMouseOutsideToolbar = toolbar.getMousePosition() == null; if (myComponent.getMousePosition() != null) { alarm.cancelAllRequests(); toolbar.scheduleShow(); if (isMouseOutsideToolbar) { alarm.addRequest(() -> { toolbar.scheduleHide(); }, 1400); } } else if (isMouseOutsideToolbar) { toolbar.scheduleHide(); } } catch (NullPointerException ignore) { //EA-356093 problem inside OpenJDK } }