Sample Code to Display mouseX and mouseY -- Uses Windows font "Arial"
              in 
             Share your Work 
              •  
              2 years ago    
            
 
           final color WHITE = color(255);
final color BLACK = color(0);
PFont standardFont = createFont("Arial", 20);
void setup()
{
  size(600, 400);
  background(WHITE);
  
}
void draw()
{
  background(WHITE);
  fill(BLACK);
  textFont(standardFont);
  textAlign(CENTER);
  {
    String string_of_text;
    string_of_text = "(" + str(int(mouseX)) + "," + str(int(mouseY)) + ")";
    text(string_of_text, width / 2.0, height - 20);  
}
  //
  // insert your code here
  //
  
}
 
              
              1  
            
 
            