Polygon arrow = getArrow(direction, size); arrowIcon arrowI = new arrowIcon(arrow); arrowI.setSize(size);
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; }
  public void paintTriangle(Graphics g, int x, int y, int size, int direction,                            boolean isEnabled)  {    Polygon arrow = getArrow(direction, size);    arrowIcon arrowI = new arrowIcon(arrow);    arrowI.setSize(size);    Color arrowColor;    if (isEnabled())      arrowColor = darkShadow;    else      arrowColor = shadow;    arrowI.paintIconImpl(g, x, y, arrowColor);  }