This site requires JavaScript, please enable it in your browser!
Greenfoot back
RedFox92
RedFox92 wrote ...

2013/9/16

Text. Help

RedFox92 RedFox92

2013/9/16

#
Can someone plz tell me how add text that stays
When setting an image for an actor, you can use the built in constructor for GreenfootImage to make text. This is how the constructor goes:
new GreenfootImage(String txt, int size, java.awt.Color textColor, java.awt.Color backgroundColor)
And you can use the above in a setImage() method for actors. Make sure to import java.awt.Color, or the colors won't work.
sametguzelgun sametguzelgun

2013/9/16

#
GreenfootImage image = new GreenfootImage("Text",fontsize,foreground,background);
setImage(image);
RedFox92 RedFox92

2013/9/17

#
Thanxs do you know how to make the text disaper after so much time has passed
You need to login to post a reply.