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

2016/11/12

how to make text in java?

sahtiamurti sahtiamurti

2016/11/12

#
i make a button in greenfoot but i want to put a text in the button, how to do it? thanks
Super_Hippo Super_Hippo

2016/11/12

#
The GreenfootImage has a constructor to deal with text. Maybe this works for you:
1
2
GreenfootImage img = new GreenfootImage("text", 13, null, null);
setImage(img);
Nosson1459 Nosson1459

2016/11/12

#
That doesn't explain much about it, see here for making a greenfoot image as text.
sahtiamurti sahtiamurti

2016/11/13

#
thanks Super_Hippo its very helpful
Nosson1459 Nosson1459

2016/11/14

#
btw check the link I wrote previously it explains how that constructor of GreenfootImage works and how to change the color and size of the text
danpost danpost

2016/11/14

#
sahtiamurti wrote...
i make a button in greenfoot but i want to put a text in the button, how to do it?
How to create a button with text is explained in my Value Display Tutorial.
You need to login to post a reply.