String (final IComponent component) { if (!(component instanceof IContainer)) { return null; } final IContainer container = (IContainer)component; if (container.getComponentCount() == 0) { return null; } if (container.isXY()) { return container.getId(); } for (int i = 0; i < container.getComponentCount(); i++) { String id = findNotEmptyPanelWithXYLayout(container.getComponent(i)); if (id != null) { return id; } } return null; }