Why doesn't these lines work:
Anywhere you put them, generates a NullPointerException.
Acording to Greenfoot documentation, it should work, creating a text with font size 20, color black and transparent background.
I am using version 3.1.0.
GreenfootImage text1 = new GreenfootImage(" ", 20, Color.BLACK, null);
GreenfootImage text2 = new GreenfootImage("any text", 20, Color.BLACK, null);
GreenfootImage text3 = new GreenfootImage("any text", 20, null, null);

