title: Triangle Draw Method
body: <p>I have trouble drawing a triangle with the <code>draw(Graphics g)</code> method in Java.
  I can draw a rectangle like so:</p>
  
  <pre><code>public void draw(Graphics g) {
      g.setColor(colorFill);
      g.fillRect(p.x, p.y, width, height);
      g.setColor(colorBorder);
      g.drawRect(p.x, p.y, width, height);
      drawHandles(g);
  </code></pre>
  
  <p>Where p represents "the top left corner of the shapes". How would I draw the triangle in the same manner?</p>
  
  <p>Could someone give me an example for a standard triangle?</p>