Slide 3.9: Line-by-line anatomy of HelloMIDlet.java (cont.) Slide 3.11: Line-by-line anatomy of HelloMIDlet.java (cont.) Home |
HelloMIDlet.java
(Cont.)
private Command cmdExit;
public HelloMIDlet( ) {
J2ME Application Manager (JAM)
is responsible for installing, running, and removing MIDlets from the handheld devices.
When a user chooses to run a MIDlet, it is the JAM that creates an instance of the MIDlet class and runs methods on it.
The sequence of methods that will be called in the MIDlet subclass is defined by the MIDlet life cycle, which is shown below:
startApp( )
, pauseApp( )
, and destroyApp( )
are the three life-cycle methods that every MIDlet must define.