I've been working on a project in Greenfoot and need to have a statement show up saying "Infection Eradicated" when you win the game, or "Infection Uncontrollable" when the player loses. I've been looking for a simple batch of code to do this, but cannot find anything that will work properly. Could anyone help me?
Note: I am adding comments to code that I didn't make on my own, so I'll give credit.
Here's what I have so far:
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
import java.awt.Font;
public class Message extends Actor
{
public void Message()
{
update Image("Infection Eradicated"); <-----I keep getting an error in this line indicating that there needs to be a semicolon inserted right before ("Infection..)
}
public Message(String text)
{
updateImage(text);
}
public void setText(String text)
{
updateImage(text);
}
private void updateImage(String text)
{
setImage(new GreenfootImage(text, 30, Color.black, Color.white));
}
I know there's most certainly going to be other errors, but I'd like any help or tips. Thank you guys.

