In the given J2ME Command Class example, we have set the various commands namely, screen, back, cancel, ok, help, stop, exit and item to the Midlet. And also set the priority for it such as 1, 2, 3 etc. In J2ME commands are used for keeping information of the commands, not the action. For defining actions, CommandListener class are used. In this example we are going to show different commands on the screen but we have not used CommandListner class into it, that's these commands will not perform any action.
Our command class Midlet will look like as follow..
Source Code of CommandMIDlet.java
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: November 20, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles