Change above to:
myPort = new Serial(this, Serial.list()[0], 115200);
Reference:
Variable Scope / Examples / Processing.org
Change above to:
myPort = new Serial(this, Serial.list()[0], 115200);
Reference:
Variable Scope / Examples / Processing.org