@Override
  public void setComponentAt(int index, Component component) {
    super.setComponentAt(index, component);
    component.addHierarchyListener(this);
    setInsets(component);
    revalidate();
    repaint();
  }
@Override
  public void setComponentAt(int index, Component component)