add method

void add(
  1. Component c
)

Adds a new component to the components list.

Also calls preAdd, witch in turn sets the current size on the component (because the resize hook won't be called until a new resize happens).

Implementation

void add(Component c) {
  preAdd(c);
  components.add(c);
}