xxxxxxxxxx
function setup() {
createCanvas(400, 400);
background(220);
}
function draw() {
// creates the grey rectangle in the upper left corner
fill('grey');
stroke('grey');
rect(0, 0, 100, 20);
// sets the color of the text
fill('black')
stroke('black');
strokeWeight(1);
// writes the text of the current coordinates in the corner
text("x: " + mouseX + " y: " + mouseY, 10, 15);
}