int x,y; void setup(){ background(230); size(200,200); } void draw(){ x=mouseX-25; y=mouseY-25; rect(x,y,50,50); }