RadContainer (final RadRootContainer rootContainer, final Point aPoint) { int EPSILON = 4; RadContainer container = FormEditingUtil.getRadContainerAt(rootContainer, aPoint.x, aPoint.y, EPSILON); // to facilitate initial component adding, increase stickiness if there is one container at top level if (container instanceof RadRootContainer && rootContainer.getComponentCount() == 1) { final RadComponent singleComponent = rootContainer.getComponents()[0]; if (singleComponent instanceof RadContainer) { Rectangle rc = singleComponent.getDelegee().getBounds(); rc.grow(EPSILON*2, EPSILON*2); if (rc.contains(aPoint)) { container = (RadContainer) singleComponent; } } } return container; }