code: private static Shape createArrowShape(int w, int y0, int y1)
      {
          Path2D path = new Path2D.Double();
          path.moveTo(0, y0);
          if ((w & 1) == 0)
          {
              path.lineTo(w>>1, y1);
          }
          else
          {
              int c = w>>1;
              path.lineTo(c, y1);
              path.lineTo(c+1, y1);
          }
          path.lineTo(w, y0);
          path.closePath();
          return path;
      }
docs: Creates a triangle shape with the given coordinates
  
  @param w The width
  @param y0 The first y-coordinate
  @param y1 The second y-coordinate
  @return The shape