docs: public Panel addComponent(int index, Component component) {
          if(component == null) {
              throw new IllegalArgumentException("Cannot add null component");
          }
          synchronized(components) {
              if(components.contains(component)) {
                  return this;
              }
              if(component.getParent() != null) {
                  component.getParent().removeComponent(component);
              }
              if (index > components.size()) {
                  index = components.size();
              }
              else if (index < 0) {
                  index = 0;
              }
              components.add(index, component);
          }
          component.onAdded(this);
          invalidate();
          return this;
      }