arrow = upIcon;
paintTriangleNorth(g, x, y, size, isEnabled);
  public void paintTriangle(Graphics g, int x, int y, int size, int direction,                            boolean isEnabled)  {    Polygon arrow = null;    switch (direction)      {      case NORTH:	arrow = upIcon;	break;      case SOUTH:	arrow = downIcon;	break;      case EAST:      case RIGHT:	arrow = rightIcon;	break;      case WEST:      case LEFT:	arrow = leftIcon;	break;      }    int[] xPoints = arrow.xpoints;    int[] yPoints = arrow.ypoints;    int x1;    int y1;    int x2;    int y2;    x1 = y1 = x2 = y2 = 0;    if (size != defaultSize)      {	float scale = size * 1f / defaultSize;	for (int i = 0; i < 3; i++)	  {	    xPoints[i] *= scale;	    yPoints[i] *= scale;	  }      }    g.translate(x, y);    switch (direction)      {      case NORTH:	x1 = xPoints[0] + 2;	y1 = yPoints[0];	y2 = y1;	x2 = xPoints[2] - 1;	break;      case SOUTH:	x1 = xPoints[1];	y1 = yPoints[1];	x2 = xPoints[2];	y2 = yPoints[2];	break;      case LEFT:      case WEST:	x1 = xPoints[0] + 1;	y1 = yPoints[0] + 1;	x2 = x1;	y2 = yPoints[2] + 1;	break;      case RIGHT:      case EAST:	x1 = xPoints[2];	y1 = yPoints[2] + 1;	x2 = xPoints[1] - 1;	y2 = yPoints[1] + 1;	break;      }    Color saved = g.getColor();    if (isEnabled)      {	g.setColor(Color.DARK_GRAY);	if (arrow != null)	  g.fillPolygon(xPoints, yPoints, 3);      }    else      {	g.setColor(Color.GRAY);	g.fillPolygon(xPoints, yPoints, 3);	g.setColor(Color.WHITE);	g.drawLine(x1, y1, x2, y2);      }    g.setColor(saved);    g.translate(-x, -y);  }