This example demonstrates the midlet state transitions.




 /*--------------------------------------------------
* StateTransitions.java
*
* Example from the book:     Core J2ME Technology
* Copyright John W. Muchow   http://www.CoreJ2ME.com
* You may use/modify for any non-commercial purpose
*-------------------------------------------------*/
import javax.microedition.midlet.*;

public class StateTransitions extends MIDlet
{
  public StateTransitions()
  {
    System.out.println("Inside constructor()");
  }

  // Required: called by application manager to start the MIDlet.
  public void startApp()
  {
    System.out.println("Inside startApp()");
  }

  // Required: called by application manager to pause the MIDlet.
  public void pauseApp()
  {
    System.out.println("Inside pauseApp()");
  }

  // Required: called by application manager before shutting down the MIDlet.
  public void destroyApp(boolean unconditional)
  {
    System.out.println("Inside destroyApp()");
  }

}