As I see it, the best way to center a text in an image is to use the "GreenfootImage(java.lang.String string, int size, java.awt.Color foreground, java.awt.Color background)" constructor of the GreenfootImage. Now what if I want to center a text, but with a different font? I know I could approximate the size of the label or hardcode the size of every letter from the font with a constant font size.
So I guess my real question is how hard would it be to create a GreenfootImage constructor, which would look something like this:
"GreenfootImage(java.lang.String string, Font font, java.awt.Color foreground, java.awt.Color background)"
I guess it's not that easy since the Greenfoot Team hasn't created it yet or is there an other reason?