protected void paintArrow(Graphics2D g2,double x,double y,int w,int h,boolean topDown){
  int intX=(int)(x + 0.5);
  int intY=(int)(y + 0.5);
  if (orientation == VERTICAL) {
    if (w % 2 == 0) {
      w=w - 1;
    }
    if (topDown) {
      for (int i=0; i < (w / 2 + 1); i++) {
        g2.drawLine(intX + i,intY + i,intX + w - i - 1,intY + i);
      }
    }
 else {
      for (int i=0; i < (w / 2 + 1); i++) {
        g2.drawLine(intX + w / 2 - i,intY + i,intX + w - w / 2 + i - 1,intY + i);
      }
    }
  }
 else {
    if (h % 2 == 0) {
      h=h - 1;
    }
    if (topDown) {
      for (int i=0; i < (h / 2 + 1); i++) {
        g2.drawLine(intX + i,intY + i,intX + i,intY + h - i - 1);
      }
    }
 else {
      for (int i=0; i < (h / 2 + 1); i++) {
        g2.drawLine(intX + i,intY + h / 2 - i,intX + i,intY + h - h / 2 + i - 1);
      }
    }
  }
}

protected void paintArrow ( Graphics2D g2 , double x , double y , int w , int h , boolean topDown ) { int intX = ( int ) ( x + 0.5 ) ; int intY = ( int ) ( y + 0.5 ) ; if ( orientation == VERTICAL ) { if ( w % 2 == 0 ) { w = w - 1 ; } if ( topDown ) { for ( int i = 0 ; i < ( w / 2 + 1 ) ; i ++ ) { g2 . drawLine ( intX + i , intY + i , intX + w - i - 1 , intY + i ) ; } } else { for ( int i = 0 ; i < ( w / 2 + 1 ) ; i ++ ) { g2 . drawLine ( intX + w / 2 - i , intY + i , intX + w - w / 2 + i - 1 , intY + i ) ; } } } else { if ( h % 2 == 0 ) { h = h - 1 ; } if ( topDown ) { for ( int i = 0 ; i < ( h / 2 + 1 ) ; i ++ ) { g2 . drawLine ( intX + i , intY + i , intX + i , intY + h - i - 1 ) ; } } else { for ( int i = 0 ; i < ( h / 2 + 1 ) ; i ++ ) { g2 . drawLine ( intX + i , intY + h / 2 - i , intX + i , intY + h - h / 2 + i - 1 ) ; } } } }
this draws an arrow as a series of lines within the specified box . the last boolean specifies whether the point should be at the right / bottom or left / top .
