void (@Nullable Component tooltipOwner) { if (!hasCurrent() || myCurrentComponent == null || myCurrentComponent != tooltipOwner) { return; } try { MouseEvent reposition; if (GraphicsEnvironment.isHeadless()) { reposition = myCurrentEvent; } else { Point topLeftComponent = myCurrentComponent.getLocationOnScreen(); Point screenLocation = MouseInfo.getPointerInfo().getLocation(); reposition = new MouseEvent( myCurrentEvent.getComponent(), myCurrentEvent.getID(), myCurrentEvent.getWhen(), myCurrentEvent.getModifiers(), screenLocation.x - topLeftComponent.x, screenLocation.y - topLeftComponent.y, screenLocation.x, screenLocation.y, myCurrentEvent.getClickCount(), myCurrentEvent.isPopupTrigger(), myCurrentEvent.getButton()); } showForComponent(myCurrentComponent, reposition, true); } catch (IllegalComponentStateException ignore) { } }