I'm trying to add a string on top of Wombat.
And for that I've added this method:
public void setText()
{
GreenfootImage image = getImage();
image.setColor(Color.WHITE);
image.drawString("XYZ", 0, 0);
setImage(image);
}
but for some reason, it's not working when I run the method no text is shown on top of the wombat image. I've also tried with image.drawString("XYZ", 60, 60); instead of image.drawString("XYZ", 0, 0);
Could I have missed something?