This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes CustomItem not working on Nokia XpressMusic smartphone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "CustomItem not working on Nokia XpressMusic smartphone" Watch "CustomItem not working on Nokia XpressMusic smartphone" New topic
Author

CustomItem not working on Nokia XpressMusic smartphone

Vinicius Souza
Ranch Hand

Joined: May 18, 2011
Posts: 45

Im creating an aplication to Nokia XpressMusic smartphone. Ive created a CustomItem descendant called CommandButtom. Its worked perfectly on the emulator but not in the real thing.
To simplify my application, I created a class called Navigator that store all forms (2 forms now) and have methods like next(), previous() etc and its set automatically the Display to the corresponding Form. I dont know why, but since Im using this Navigator Class, the problem occurs. My CommandButtom is not correctly painted and display only a white rectangle.
Bellow my CommandButtom class to you guys see what Im doing wrong:

Please, I need to know what is wrong.


Java is the best (I love C too) heehhh
Walter Gabrielsen Iii
Ranch Hand

Joined: Apr 09, 2011
Posts: 158
Do you use the "setClip" method of Graphics class?

Do you first set the color before drawing each shape in the paint methods?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: CustomItem not working on Nokia XpressMusic smartphone
 
Similar Threads
a Jbutton with a rounded border
Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)
Ladders and slides
CustomItem : Label dont Expand
Adding a custom component to a layout?