Reading file through PC using Processing 3.3

Following is the code of processing followed by arduino code. In processing code it is reading a particular file and sending it to arduino. Arduino is reading and displaying the data.
But I am not able to see anything in Serial monitor .

Serial myPort;  // Create object from Serial class
void setup() 
{
size(200,200); //make our canvas 200 x 200 pixels big
String portName = Serial.list()[0]; //change the 0 to a 1 or 2 etc. to match your port
myPort = new Serial(this, portName, 9600);
serialEvent( myPort);
}
void serialEvent (Serial myPort)
{
String[] lines = loadStrings("C:\\Users\\visma\\Desktop\\Project codes\\mydata.txt");
//println("there are " + lines.length + " lines");
for (int i = 0 ; i < lines.length; i++) {
myPort.write(lines[i]);
println(lines[i]);
}
}

// Arduino Code
#include<SoftwareSerial.h>
char val;
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0) {
val = Serial.read();
Serial.write(val); 
Serial.print(val);
}
}
String portName = Serial.list()[0]; //change the 0 to a 1 or 2 etc. to match your port

What port is that? Is it the port that the Arduino is connected to?

serialEvent( myPort);

Why are you calling serialEvent()? You should never call that function.

The serialEvent() function is called when serial data arrives. You are abusing the hell out of the function.

#include<SoftwareSerial.h>

Why? You don’t use SoftwareSerial.

But I am not able to see anything in Serial monitor .

The ONE serial port has the Arduino at one end and Processing on the other end. How can you expect to see the data that those two are sharing in some other application?