public void initPortNames(){
  initialized=false;
  cbPort.addItem("");
  CommPortIdentifier currPort;
  Enumeration ports=CommPortIdentifier.getPortIdentifiers();
  while (ports.hasMoreElements()) {
    currPort=(CommPortIdentifier)ports.nextElement();
    if (currPort.getPortType() == CommPortIdentifier.PORT_SERIAL) {
      cbPort.addItem(currPort.getName());
    }
  }
  initialized=true;
}

public void initPortNames ( ) { initialized = false ; cbPort . addItem ( "" ) ; CommPortIdentifier currPort ; Enumeration ports = CommPortIdentifier . getPortIdentifiers ( ) ; while ( ports . hasMoreElements ( ) ) { currPort = ( CommPortIdentifier ) ports . nextElement ( ) ; if ( currPort . getPortType ( ) == CommPortIdentifier . PORT_SERIAL ) { cbPort . addItem ( currPort . getName ( ) ) ; } } initialized = true ; }
initialize list of available port names for combo box
