int (final String constraint) { BorderLayout layout = (BorderLayout) myContainer.getLayout(); Component c = layout.getLayoutComponent(myContainer.getDelegee(), constraint); if (c == null) { return 0; } return c.getBounds().height; }