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

2013/9/4

Change color

dominicarrojado dominicarrojado

2013/9/4

#
How can I change text color for this code:
text = prefix;
        stringLength = (text.length() + 2) * 16;

        setImage(new GreenfootImage(stringLength, 24));
        GreenfootImage image = getImage();
        Font font = image.getFont();
        image.setFont(font.deriveFont(14.0f)); 
RedCreeper RedCreeper

2013/9/4

#
//import field
import java.awt.Color;
// after line 6
image.setColor(Color.WHITE); // replace WHITE with the right color
dominicarrojado dominicarrojado

2013/9/4

#
Thanks!
You need to login to post a reply.