public void populateFields() {
    ICFSecurityTSecGroupObj popObj;
    ICFSecurityTSecGroupObj focus = getSwingFocusAsTSecGroup();
    if (focus != null) {
      popObj = (ICFSecurityTSecGroupObj) (focus.getEdit());
      if (popObj == null) {
        popObj = focus;
      }
    } else {
      popObj = null;
    }
    if (getPanelMode() == CFJPanel.PanelMode.Unknown) {
      popObj = null;
    }
    if (popObj == null) {
      swingContainerTenantObj = null;
    } else {
      swingContainerTenantObj =
          (ICFDbTestTenantObj) popObj.getRequiredContainerTenant(swingIsInitializing);
    }
    if (swingReferenceContainerTenant != null) {
      swingReferenceContainerTenant.setReferencedObject(swingContainerTenantObj);
    }

    if (popObj == null) {
      getSwingEditorTSecGroupId().setInt32Value(null);
    } else {
      getSwingEditorTSecGroupId().setInt32Value(popObj.getRequiredTSecGroupId());
    }

    if (popObj == null) {
      getSwingEditorName().setStringValue(null);
    } else {
      getSwingEditorName().setStringValue(popObj.getRequiredName());
    }
  }