code: public void updateMainComponent(Component comp) {
  
          comp.setSizeFull();
          m_rootLayout.setMainContent(comp);
          Map<String, Object> attributes = getAttributesForComponent(comp);
          updateAppAttributes(attributes);
      }
docs: Replaces the app's  main component with the given component.<p>
  
  This also handles the attributes for the component, just as if the given component was returned by an app's
  getComponentForState method.
  
  @param comp the component to set as the main component