wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes Command buttons display on screen 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 "Command buttons display on screen" Watch "Command buttons display on screen" New topic
Author

Command buttons display on screen

Priety Sharma
Ranch Hand

Joined: Jun 10, 2008
Posts: 156

I have a midlet with 2 screens.
Screen one is a form which has 2 StringItems and 1 TextField in that sequence.
The StringItems display simple text messages.
The Textfield is a initialized as follows:


I have added 2 Commands to the initial screen. One for exit to close the application. One "Ok" Command to go to the 2nd screen.
One BACK command to the 2nd screen to return to the 1st screen.

I have attached an image of the 1st screen when I have clicked on menu button and the menu is getting displayed.

Since there are only 2 commands on this screen Exit and Ok. I want on command to be displayed at the bottom left corner and one on the bottom right corner insted of the menu getting displayed.
How do I achieve this?

My code is as follows:



Please help.


[Thumbnail for storenumber.JPG]



Priety.
Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

I think you can't do that in j2me. I am not very much sure, but it may possible on some mobiles one command may be display on bottom right and one at bottom left , but on some mobile it display as a menu.


Life is easy because we write the source code.....
Priety Sharma
Ranch Hand

Joined: Jun 10, 2008
Posts: 156

Hi,

Yeah when I put it on my sony ericsson W810i it showed as 2 different buttons, one at the left bottom corner and one at the right bottom corner.

This is not happening with the emulator.

Thanks!
Gopinath Karyadath
Ranch Hand

Joined: Oct 14, 2009
Posts: 87
try with

private Command exit = new Command("Exit", Command.EXIT,0);


Regards
 
wood burning stoves
 
subject: Command buttons display on screen
 
Similar Threads
NullPointerException
System Information Code not running
J2ME, servlet and database help..
Retrieve occassion which is stored in RMS
Getting Live Data Problem Problem