Rectangle (@NotNull LightweightHint hint) { JComponent component = hint.getComponent(); Point location = hint.getLocationOn(component); SwingUtilities.convertPointToScreen(location, component); return new Rectangle(location, hint.getSize()); }