title: how to paint area in JAVA
body: <p>I have this code:</p>
  
  <pre><code>public void DoDraw(Graphics g, Main_Data M_D, int x, int y){
      if(x&lt;0 || y&lt;0 || x&gt;50 || y&gt;60){
          return;
      }
      else
      if(M_D.getPix()[x][y].p_c.isEmpty()){
  
          g.setColor(Color.red);
          g.drawLine(x, y, x, y);
      }
      DoDraw(g ,M_D, x+1, y);
      DoDraw(g ,M_D, x, y+1);
      DoDraw(g ,M_D, x-1, y);
      DoDraw(g ,M_D, x, y-1);
      return;
  }
  </code></pre>
  
  <p>This is my problem : Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError</p>
  
  <p>where is mistake please?? </p>