This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Midlet Colours? (On forms etc..) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Reply Bookmark "Midlet Colours? (On forms etc..)" Watch "Midlet Colours? (On forms etc..)" New topic
Author

Midlet Colours? (On forms etc..)

Mark Greene
Greenhorn

Joined: Apr 07, 2004
Posts: 18
I've written a midlet (consisting of several forms) for one of our customers. However they'd like the midlet to change to reflect the colours of their company's branding.
Is it possible to change the colour/background or anything else of the forms & items in a midlet..? (MIDP 2.0).
any help/pointers appreciated,
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17231
    
    1

Yes you can. If you use the Canvas class and create your own class that extends Canvas, you can use the Graphics object in the paint method and change colors.

In this code I fill the background with a color. I don't remember which color this is, but you can use the setColor() method of the Graphics object and change the color. But remember to change it back or you might find your text invisible because it has the same color as the background. I did this that is how I know.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Greene
Greenhorn

Joined: Apr 07, 2004
Posts: 18
Sorry I should have been more specific, yes I know that you can use the graphics class to draw colours on canvas etc.. but what I am trying to change is the colours of forms, buttons, choicegroups etc.. basically midp2.0 Items.
I don't think it can be done.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Midlet Colours? (On forms etc..)
 
Similar Threads
Is it possible to use Screen and Canvas together?
22 Nov Riddle
WA #1.....word association
XYbarChart
Jbutton colour issue while changing look anf feel