I am very new to Greenfoot and I want to display my score in black. For some reason, this shows an error at Color.BLACK. It says "incompatible types:java.awt.Color cannot be converted to greenfoot.Color". It shows the exact same error in other scripts where I want to display any text. Please help!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; /** * Write a description of class youwin here. * * @author (your name) * @version (a version number or a date) */ public class youwin extends Actor { /** * Act - do whatever the youwin wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public youwin() { GreenfootImage image = new GreenfootImage( "YOU WIN!" , 20 , Color.BLACK, Color.WHITE); setImage(image); } } |