import processing.net.*; //get the net library Client MyClient; //define a client void setup(){ size(300,300); MyClient = new Client(this, “127.0.0.1”, 5200); } void draw(){ if(MyClient.available()>0){ //if data are available int x = MyClient.read(); //get the x-coordinate int y = MyClient.read(); //get the y-coordinate rect(x,y,5,5); //draw a rect at xy println(x+”, “+y); //print out coordinates } }