title: Processing - change mouseClicked() code
body: <p>Is there a way i can reset(change) the code of the method <code>void mouseClicked()</code> ,initially defined in the code, after an if(condition) is verified ?</p>
  
  <p><strong>Example :</strong>
  if i had:</p>
  
  <pre><code>void mouseClicked(){
  print("clicked1");
  }
  
  
  
  void draw(){
    if(frameRate&gt;=1000) ----&gt; 
    //redefine mouseClicked() method so that it will do 
    exit(); 
  }
  </code></pre>