title: Processing Code does not work
body: <p>I started programming with Processing today and wrote a little programm that creates 10 random rectangles
  Now I like to make them disappear when the mouse is over them, but my actual code is not working </p>
  
  <p>I would apprechiate some tipps ...</p>
  
  <p><pre></p>
  
  <code>import java.awt.Rectangle;
  
  Rectangle rect[] = new Rectangle[10];
  int xpos[] = new int[10];
  int ypos[] = new int[10];
  int size = 25;
  boolean visible[] = new boolean[10];
  
  
  void setup()
    {
  
      size(640,480);
      frameRate(60);
      smooth();
      background(0);
      stroke(255); 
      fill(255);
      textAlign(CENTER);
      textSize(200);
      text("Catch", width/2, 280);
      textSize(100);
      text("them", width/2, 380);
  
  // 10 Random positions for the rectangles  
      for (int i=0; i &lt; 10; i++) {
           xpos[i] =  int(random (615));
           ypos[i] =  int(random (455));
           visible[i] = true;
  
      }
       for (int i=0; i &lt; 10; i++) {
           rect[i] = new Rectangle(xpos[i],ypos[i],size,size);
  
    }        
  }
  
    void draw()
    {    
        for (int i=0; i &lt; 10; i++) {
  
          if (visible[i] == true){
             fill(255,0,0);
             rect(rect[i].x,rect[i].y,rect[i].width,rect[i].height);}
  
          else if (rect[i].contains(mouseX,mouseY)){
               visible[i] = false; }
  
  
        }}
  </code></pre>
  
  <p></p>