@Override
  public void addLayoutComponent(Component component, Object constraints) {
    if (constraints != null) throw new IllegalArgumentException("unsupported constraints: " + constraints);
    Container container = component.getParent();
    component.setVisible(container != null && 0 < container.getComponentCount());
  }
@Override
  public void addLayoutComponent(Component component, Object constraints)