final int sideLength = (int) (8 * 1.0);
final int sideStrength = (int) (5 * 1.0);
final double aDir = Math.atan2(x - xChild, y - yChild);
// create new polygon for arrow head...
final Polygon tmpPoly = new Polygon();
// add arrow tip as point...
tmpPoly.addPoint(xChild, yChild);
// add one edge as point...
tmpPoly.addPoint(xChild + xCor(sideLength, aDir + 0.5), yChild + yCor(sideLength, aDir + 0.5));
// add between the edges as point...
tmpPoly.addPoint(xChild + xCor(sideStrength, aDir), yChild + yCor(sideStrength, aDir));
// add other edge as point...
tmpPoly.addPoint(xChild + xCor(sideLength, aDir - 0.5), yChild + yCor(sideLength, aDir - 0.5));
// add arrow tip as point...
tmpPoly.addPoint(xChild, yChild);
g.drawPolygon(tmpPoly); // draw the arrow head
g.fillPolygon(tmpPoly); // fill the arrow head
}
}