Hi, I was just wondering how I should declare the variable "colour" in the code because I cannot compile it as it says cannot find variable colour.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class PopUpMessage here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class PopUpMessage extends Actor
{
public PopUpMessage(String message)
{
// create an image object: message, fontSize, fg color, bg color
GreenfootImage image = new GreenfootImage(message, 50, Colour.BLACK, Colour.WHITE);
// draw a red border on the image
image.setColor(Color.RED);
image.drawRect(0, 0, image.getWidth()-1, image.getHeight()-1);
// assign the image to the actor
setImage(image);
}
public void gameOver(String message)
{
PopUpMessage popUp = new PopUpMessage(message);
addObject(popUp, getWidth() / 2, getHeight() / 2);
Greenfoot.stop();
}
}

