code: public void addBox(Box box) {
          if (box != null) {
              boxes = new ArrayList<Box>(getBoxes());
              boxes.add(box);
          }
      }
docs: Add <code>box</code> to the container and sets the parent correctly. If <code>box</code> is <code>null</code>
  nochange will be performed and no error thrown.
  
  @param box will be added to the container