code: public void setActiveComponent(PageComponent pageComponent) {
          if (!pageComponents.contains(pageComponent)) {
              return;
          }
  
          // if pageComponent is already active, don't do anything
          if (this.activeComponent == pageComponent || settingActiveComponent) {
              return;
          }
  
          settingActiveComponent = true;
          try {
              if (this.activeComponent != null) {
                  fireFocusLost(this.activeComponent);
              }
              giveFocusTo(pageComponent);
              this.activeComponent = pageComponent;
              fireFocusGained(this.activeComponent);
          } finally {
              // If this is not done in a finally, any exception thrown in fireFocusGained
              // will prevent the user from leaving the screen
              settingActiveComponent = false;
          }
      }
docs: Activates the given <code>PageComponent</code>. Does nothing if it is already the active one.
  <p>
  Does nothing if this <code>ApplicationPage</code> doesn't contain the given <code>PageComponent</code>.
  
  @param pageComponent
  the <code>PageComponent</code>