Rectangle (ComponentDragObject dragObject, boolean ignoreWidth, boolean ignoreHeight, boolean overlapping) { if (dragObject.getComponentCount() == 0) { return null; } Rectangle rc = calculateGridFeedbackCellRect(dragObject, ignoreWidth, ignoreHeight, true); if (rc == null) { return calculateGridFeedbackCellRect(dragObject, ignoreWidth, ignoreHeight, false); } if (overlapping && findOverlappingComponent(rc.y, rc.x, rc.height + 1, rc.width + 1) != null) { return calculateGridFeedbackCellRect(dragObject, ignoreWidth, ignoreHeight, false); } return rc; }