How could I make a program without needing to make any classes other than a world?
To be more specific:
How can I make objects from the world without actor classes.
And similarly, make GreenfootImage(s), in this case, textboxes.
My example code (from: http://www.greenfoot.org/scenarios/9362):
**Background (I want this to be my only SubClass)**
Buttons Button=new Buttons;
Labels Label=new Labels;
public Background(){
for(int i=0;i<20;i++){
Button = new Buttons();
Label=new Labels(LabelText);
Button.setImage(myImage);
addObject(Button, 10+i, 10+1); addObject(Label,10+i, 10+i);
}
TextField TextBox = new TextField("0");
addObject(TextBox,235,25);
**TextField**
public TextField(String text){
GreenfootImage TextBox= new GreenfootImage(20*text.length(),20);
TextBox.drawString(text,2,20);
setImage(TextBox);
}
**Buttons is Empty**
Thanks :)