public static Text getLabel(Graphics pen, Text text, String label)
    {
        Text temp = new Text(label);
        double x = text.getPos().x + text.getWidth(pen) / 2 - temp.getWidth(pen) / 2; 
        double y = text.getPos().y - 2 * text.getHeight(pen);
        temp.setPos(new Point2D.Double(x, y));
        return temp;
    }