I am probably either doing something wrong or I am missing something very obvious. But here is my code.
When compiled I get this error "method setFont in class greenfoot.GreentootImage cannont be applied to given types; required: java.awt.font found: int reason: actual argument int cannot be converted to java.awt.Font by method invocation conversion.
any help is appreciated.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
import java.awt.Font;
/**
* Write a description of class Road here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Road extends World
{
/**
* Constructor for objects of class Road.
*
*/
public Road()
{
super(700, 700, 1);
showMessage();
prepare();
}
private void showMessage()
{
GreenfootImage bg = getBackground();
bg.setColor(Color.BLACK);
bg.setFont(Font.BOLD);
bg.drawString ("press 'w' to go forward and 'd' and 'a' to turn right and left.", 240, 350);
}
}

