code: public Sheet getSheet() {
          if (sheet != null) {
              return sheet;
          }
  
          UIComponent parent = getParent();
          while (parent != null && !(parent instanceof Sheet)) {
              parent = parent.getParent();
          }
          return (Sheet) parent;
      }
docs: Get the parent sheet
  
  @return