code: public boolean readKeyed(FieldInfo field)
      {
          boolean bSuccess = false;
          String strValue = field.getString();
          FieldList fieldList = this.getFieldList();
          FieldTable fieldTable = null;
          if (fieldList != null)
              fieldTable = fieldList.getTable();
          if (strValue != null)
              if (strValue.length() > 0)
                  if (fieldTable != null)
          {
              try   {
                  if (!(bSuccess = fieldTable.seek(null)))
                  {
                      fieldTable.addNew();
                      field.setString(strValue);
                  }
              } catch (Exception ex)  {
                  this.getBaseApplet().setStatusText(ex.getMessage(), JOptionPane.ERROR_MESSAGE);
              }
          }
          return bSuccess;
      }
docs: Read from this record's default key.
  In order to get this to work, you need to add some code like this:
  <pre>
  boolean bFirstChange = false;
  if (this.getFieldList() != null)
  if (this.getFieldList().getEditMode() == Constants.EDIT_ADD)
  if (this.getFieldList().isModified() == false)
  bFirstChange = true;
  super.focusLost(e);
  if (bFirstChange)
  {
  m_componentNextFocus = null;
  Component component = (Component)e.getSource();
  String string = component.getName();
  FieldInfo field = m_vFieldList.getFieldInfo(string);        // Get the fieldInfo for this component
  if (field != null)
  if ("TestCode".equals(string))
  {
  this.getFieldList().setKeyName("TestCode");
  this.readKeyed(field);
  }
  }
  </pre>
  @return boolean success if successful (if not, does an addnew())