Easy Question - Command button placement

This should be an easy question: I have a canvas, to which I am adding a single command via addCommand. This command appears on the left button, but I want it to appear on the right button (like the "Done" button on an Alert). Anybody know how to force it to the right button?

Thx,

Fred

[319 byte] By [HypnosFred] at [2007-9-26 14:22:12]
# 1

[HypnosFred],

I don't think so, I believe that each KVM implementation determines a fixed position for the BACK, CANCEL, EXIT, OK, SCREEN and STOP commands for the addCommand() method.

Also I read somewhere that stated most devices have a standard policy of putting certain types of commands in standard places of the device screen or certain buttons as fixed buttons assigned to certain command actions respectively.

HTH.

Allen Lai

Developer Technical Support

SUN Microsystems

http://www.sun.com/developers/support/

allenlai at 2007-7-2 16:01:46 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Thanks Allen, that did the trick, I just needed to change my button to type OK instead of BACK.Fred
HypnosFred at 2007-7-2 16:01:46 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3

[HypnosFred],

Glad that you have the solution to your problem.

You might want to test your MIDlet on different emulators just to see if the OK button always appear on the right hand side. Like I mentioned, different devices may position the OK button differently. Depending on the design of your MIDlet application, having the OK button not located on the right bottom side of the screen on a different device may produce weird results.

Glad to help.

Allen Lai

Developer Technical Support

SUN Microsystems

http://www.sun.com/developers/support/

allenlai at 2007-7-2 16:01:46 > top of Java-index,Java Mobility Forums,Java ME Technologies...