Command-Processing Scenario
The scenario for command processing in the MIDP is conceptually similar to other GUI toolkits. A command listener is an object that receives notifications of the occurrence of commands. Command listeners register to receive notification of commands.
Some external action, such as the user press of a button, results in the MIDP implementation detecting the event and associating it with the currently displayed screen. It encapsulates the event in a Command object. A registered command listener receives notification of the event. The listener then takes some action that represents the behavior of the command.
Commands can only be associated with Displayable widgets. That is, you can add or remove Command objects to and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access