title: Draw a rectangle in libgdx and increase its length
body: <p>I am new to libgdx.</p>
  
  <p>This is what I know:</p>
  
  <p>We can create a rectangular box with red color using this:</p>
  
  <pre><code>  shapeRenderer.begin(ShapeType.FilledRectangle);
    shapeRenderer.setColor(Color.RED);
    shapeRenderer.filledRect(0, 0, 300, 20);
    shapeRenderer.end();
  </code></pre>
  
  <p>What I want to know:</p>
  
  <p>I want this rectangle to persist between different frames.what I want is to create a rectangle object, and increase its length after every 3 seconds or so.</p>
  
  <p>How to do this esactly? as from what i gather, if i use this code in betwen batch.begin() and batch.end() of render, it will create a new box in every frame.</p>