Quote:
Originally Posted by jbstevens I would think the code to change the background of my created app would be fairly simple.
Lets just say I want my background to be the color blue...what code should I input to have my app do this? (i've searched many places and cant get an easy answer) thanks |
You could do something like this.
Add the BackgroundFieldManager to your Screen that implements MainScreen
Override the paint(). then draw a background the color you want and then involke the super. paint() to paint the other crap.
This is one way you could do it. Code isn't so great but it shows you how to do it.
public class BackgroundFieldManager extends VerticalFieldManager {
public BackgroundFieldManager(long style) {
super(style);
}
public void paint(Graphics graphics)
{
graphics.setColor(Color.BLUE) ;
graphics.fillRect(0,0,Display.getWidth(),Display.g etHeight()) ;
super.paint(graphics);
}