i have this code which displays help box. but i want it to grow bigger but every time it turns to a Gray square.
this is my code:
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Font; import java.awt.Color; /** * Write a description of class Help here. * * @author (your name) * @version (a version number or a date) */ public class Help extends Actor { GreenfootImage img; int width; int height; int cw; int ch; int doh; int dow; public Help(String text,int width, int height){ this.width = width; this.height = height; img = new GreenfootImage(width,height); getImage().scale(width,height); img = getImage(); Color ts = new Color(239,249,249); Font title = new Font("Verdana", Font.BOLD, 12); img.setFont(title); img.drawString(text,45,27); setImage(img); } /** * Act - do whatever the Help wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { if(cw<width){ dow++; } if(ch<height){ doh++; } getImage().scale(dow,doh); } }