code: public static Component find(String locator, String id, String componentType, boolean required) {
          java.awt.Component component = findComponent(locator, currentWindow().getComponent()
              .getSource());
          if (component == null) {
          	if (!required) {
          		componentMap.putComponent(id, null);
          		return null;
          	} else {
          		throw new JemmyDSLException("Component not found");
          	}
          }
          JComponentOperator operator = convertFind(component);
          componentMap.putComponent(id, operator);
          final Component finalComponent = convertFind(operator);
          if (finalComponent instanceof Window) {
              currentWindow = (Window) finalComponent;
          }
          return finalComponent;
      }
docs: Finds a component and stores it under the given id. The component can later be used on other
  commands using the locator "id=ID_ASSIGNED". This method searches both VISIBLE and INVISIBLE
  components.
  
  @param locator The locator (accepted are name (default), title, text, label)
  @param id The id
  @param componentType The component type
  @return The component found