public String constructPropertyValue(String prop){
  String retString=null;
  if (prop.equals("IPAddressList")) {
    int numAddrs=ipAddress.getItemCount();
    if (numAddrs > 0) {
      retString="";
    }
 else {
      retString=DEFAULT_IP_ADDRESS;
    }
    for (int i=0; i < numAddrs; i++) {
      retString+=ipAddress.getItemAt(i);
      if (i != numAddrs - 1) {
        retString+=PROP_DELIM;
      }
    }
  }
 else   if (prop.equals("IPPortList")) {
    int numPorts=port.getItemCount();
    if (numPorts > 0) {
      retString="";
    }
 else {
      retString=DEFAULT_PORT_NUMBER;
    }
    for (int i=0; i < numPorts; i++) {
      retString+=port.getItemAt(i);
      if (i != numPorts - 1) {
        retString+=PROP_DELIM;
      }
    }
  }
 else   if (prop.equals("ClientId")) {
    retString=optionsComp.getClientID();
  }
 else   if (prop.equals("Persistence")) {
    retString=String.valueOf(optionsComp.isPersistenceSelected());
  }
 else   if (prop.equals("PersistenceDir")) {
    retString=optionsComp.getPersistenceDirectory();
  }
  return retString;
}

public String constructPropertyValue ( String prop ) { String retString = null ; if ( prop . equals ( "IPAddressList" ) ) { int numAddrs = ipAddress . getItemCount ( ) ; if ( numAddrs > 0 ) { retString = "" ; } else { retString = DEFAULT_IP_ADDRESS ; } for ( int i = 0 ; i < numAddrs ; i ++ ) { retString += ipAddress . getItemAt ( i ) ; if ( i != numAddrs - 1 ) { retString += PROP_DELIM ; } } } else if ( prop . equals ( "IPPortList" ) ) { int numPorts = port . getItemCount ( ) ; if ( numPorts > 0 ) { retString = "" ; } else { retString = DEFAULT_PORT_NUMBER ; } for ( int i = 0 ; i < numPorts ; i ++ ) { retString += port . getItemAt ( i ) ; if ( i != numPorts - 1 ) { retString += PROP_DELIM ; } } } else if ( prop . equals ( "ClientId" ) ) { retString = optionsComp . getClientID ( ) ; } else if ( prop . equals ( "Persistence" ) ) { retString = String . valueOf ( optionsComp . isPersistenceSelected ( ) ) ; } else if ( prop . equals ( "PersistenceDir" ) ) { retString = optionsComp . getPersistenceDirectory ( ) ; } return retString ; }
for a given property key construct a value to associate with the key the value can then be inserted in a properties object
