• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Color in forms

 
Ricardo Rodriguez
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried searching for this question in the forum, and I couldn't find it. I apoogize if it's already been answered, and I'd appreciate a link to any thread that might answer it.

At any rate, I'm building a J2ME game, and I want people to input their initials when they reach a high score. The entire game has "black" backgrounds, however if I introduce a form and textField to the user, it ends up being on a "white" background.

Is there any way to change the color of a form, much like you do in a Canvas subclass?

Please advise.
 
Rakesh Kumar
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u set a variable highScore, and it it is set true u can draw a fill rect with white color as below.

if(highScore){
g.setColor(0xffffff);
g.fillRect(0,0,getWidth(),getHeight());
}

thanks
rakesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic