void (final RadContainer container) { RadContainer parent = container.getParent(); RadComponent child = null; Object childLayoutConstraints = null; if (container.getComponentCount() == 1) { child = container.getComponent(0); childLayoutConstraints = container.getCustomLayoutConstraints(); child.getConstraints().restore(container.getConstraints()); container.removeComponent(child); } int childIndex = parent.indexOfComponent(container); FormEditingUtil.deleteComponents(Collections.singletonList(container), false); if (child != null) { if (childLayoutConstraints != null) { child.setCustomLayoutConstraints(childLayoutConstraints); } parent.addComponent(child, childIndex); child.revalidate(); } }