#ff0000 19  2005 . - #000655 MIDlet  Java 
#def       J2ME MIDlet-.
MIDlet    MIDP (Mobile Information Device Profile) Java ,       . 
   MIDlet-         .            -  ,    .           .      ,     ,  AMS (Application-Management Software) -   .  , AMS     :        .
  MIDlet-
     Java,  ,        main(),       . ,  MIDlet    Java ,      .        javax.microedition.midlet.MIDlet.        ,    MIDlet , : startApp(), pauseApp()  destroyApp().
 MIDlet       :
paused: MIDlet ,   .
active: MIDlet .
destroyed:  MIDlet     ,            .
    MIDlet-. AMS          .              .
, MIDlet    paused.      ,    . MIDlet       ,         startApp().   ,     , AMS  MIDlet      startApp().,                     . MIDlet     paused  active.    - ,     javax.microedition.midlet.MIDletStateChangeException,     MIDlet   destroyed.
         paused, MIDlet   ,            .        AMS,     pauseApp().   MIDlet  
,       ,   pauseApp()  .
       MIDlet        destroyed.     AMS,      destroyApp().        boolean,        .  MIDlet   , destroyApp()  .
    MIDlet-a.
import javax.microedition.midlet.*;

public class BasicMIDlet extends MIDlet {
    public BasicMIDlet(){
 // 
    }

    protected void destroyApp( boolean unconditional )
       throws MIDletStateChangeException {
 //     MIDlet
    }

    protected void pauseApp(){
 //       .
    }

    protected void startApp()
       throws MIDletStateChangeException {
 // ,      .
    }
}


  MIDlet-
 java.microedition.midlet.MIDlet   ,    MIDlet-     : getAppProperty()      ; resumeRequest()  AMS   MIDlet; notifyPaused()  MIDlet    paused; notifyDestroyed()  MIDlet   destroyed.
   ,         .        (application  descriptor     jad)      ( Manifest.MF).   getAppProperty(),      ,    ,     ,  . (MIDP  2.0         (trusted)   ,            getAppProparty()   ).
             MIDlet-.      MIDlet   resumeRequest()   .   MIDlet    notifyPaused(),  .           
MIDlet   notifyDestroyed()  . ,  resumeRequest()    AMS  MIDlet; ASM          ,  .     startApp().        notifyPaused()        notifyDestroyed()
    MIDlet-   ;    pauseApp()  destroyApp  .
      MIDlet-.
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class BetterMIDlet extends MIDlet {

    private Display display;

    public BetterMIDlet(){
    }

    protected void destroyApp( boolean unconditional )
       throws MIDletStateChangeException {
 exitApp(); //   
    }

    protected void pauseApp(){
 //    ,    
         //      .
    }

    protected void startApp()
       throws MIDletStateChangeException {
 if( display == null ){
     initApp(); //   
 }
 //    ,    
         //      .
    }

    private void initApp(){
 display = Display.getDisplay( this );
 //     
    }

    public void exitApp(){
 //   " "
 notifyDestroyed(); //  MIDlet-
    }
}
terMidlet   initApp() -      exitApp() -     .
  ,     :
 ,      MIDlet-
startApp()	    .
pauseApp()	    .
destroyApp()	  .
   MIDlet-.
notifyDestroyed()	   .
notifyPaused()	       .
resumeRequest()	       .
    MIDP ,    MIDlet-  ,       "  J2ME   ".
    "Understanding J2ME Application Models" by Eric Giguere. #0000ff : Arix 
#ff0000          : www.mobilab.ru