Point (@Nullable Component aTargetComponent) { //todo: remove that after implementation of DND to html design time controls boolean window = aTargetComponent instanceof Window; if (aTargetComponent == null || !window && (aTargetComponent.getParent() == null || SwingUtilities.getWindowAncestor(aTargetComponent) == null)) { return new Point(); } return SwingUtilities.convertPoint(getComponent(), getPoint(), aTargetComponent); }