Command Processing

The MIDP high-level API supports event processing through the use of commands. A command represents a user action—for instance, something the user does on screen such as pressing a function button. An event is the occurrence of an action. Events can represent the invocation of a command in response to a user action.

A command captures the semantic information or representation of a user action or event. It does not, however, define the behavior that results from the action or event. The application defines the processing—the behavior, if you will—that results from the occurrence of some command.

The Command class in the javax.microedition.lcdui package describes commands. This class encapsulates three pieces of information: ...

Get Wireless J2ME™ Platform Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.