// WARNING: This file is auto-generated and any changes to it will be overwritten import lang.stride.*; import java.util.*; import greenfoot.*; /** * */ public class Textbox extends Actor { private String text; private Color color; private Font font; private int width; private int height; /** * */ public Textbox(String text, Font font, Color color, int width, int height) { this.text = text; this.font = font; this.color = color; this.width = width; this.height = height; } /** * Act - do whatever the Textbox wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { } /** * */ protected void addedToWorld(World world) { GreenfootImage gf = new GreenfootImage(width, height); this.setImage(gf); this.getImage().setFont(font); this.getImage().setColor(color); this.getImage().drawString(text, 20, 20); } }