g.setColor(Color.black);
pagePolygon.translate(x, y);
g.drawPolygon(pagePolygon);
pagePolygon.translate(-x, -y);
if (direction == UP) {
arrowUpPolygon.translate(x, y);
g.fillPolygon(arrowUpPolygon);
arrowUpPolygon.translate(-x, -y);
}
else {
arrowDownPolygon.translate(x, y);
g.fillPolygon(arrowDownPolygon);
arrowDownPolygon.translate(-x, -y);
}