title: what can I use insead putPixel method
body: <p>I would like to draw line using Bresenham Algorithm but I have problem. I dont know, what should I use instead <code>putPixel()</code> method in my code:</p>
  
  <pre><code>public void Line(int x0, int y0, int x1, int y1){
  
      int deltaX = x1-x0;
      int deltaY = y1-y0;
  
      double error = 0;
      double realError = deltaY/(double) deltaX;
  
      double j = y0;
      for(int i = x0; i&lt;= x1; i++){
          putpixel(i,(int)j);
          j += realError;
      }
  
  }
  </code></pre>
  
  <p>All tutorials have <code>putpixel()</code> method. What can I use instead of this method? </p>