Hey men,
i want to create an image which tells the actual score of my game.
The creation works, but my background is black and the letters are also black, so one cant see it.
Therefore i want to change the letters color.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
public class Anzeige extends Actor
{
public Anzeige(String text)
{
GreenfootImage Anz = new GreenfootImage (text.length()*20, 30);
Anz.drawString (text, 2, 20);
Anz.setColor(Color.YELLOW);
setImage (Anz);
}
public void setText(String text)
{
GreenfootImage Anz = getImage();
Anz.clear();
Anz.drawString (text, 2, 20);
}
}
The syntax doesnt have an error, but the letters color doesnt change.
Any ideas?
Thank you

