void setup(){ size(640, 480); } void draw(){ // mouseX and mouseY provide the current mouse position ellipse(mouseX, mouseY, 5, 5); // graphic output example println("x:" + mouseX + " y:" + mouseY); }