Ive seen a scenario which has a make text method to make text of you choice, but I cant seem to use it myself, Help?


//You'll need this import statement: import java.awt.*; //And then here's the code: GreenfootImage img = new GreenfootImage(500, 50); img.setColor(Color.BLACK); //Change this to the colour of text that you want float fontSize = 35.0f; //Change this to the font size that you want Font font = img.getFont().deriveFont(fontSize); //This adjusts the default font to the correct size. img.setFont(font); img.drawString("The text that you want", x, y); setImage(img);
setImage(new GreenfootImage(" Click here for dialog ", 30, Color.BLACK, Color.RED));