package com.annimon.jecp.me;

import com.annimon.jecp.ApplicationListener;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;

/**
 *
 * @author aNNiMON
 */
public abstract class JecpApplication extends MIDlet implements ApplicationListener {
    
    private MIDlet midlet;
    private Display display;

    protected final void startApp() {
        midlet = this;
        display = Display.getDisplay(this);
        display.setCurrent(new JecpCanvas(this));
    }

    protected final void pauseApp() {
        onPauseApp();
    }

    protected final void destroyApp(boolean unconditional) {
        onDestroyApp();
        notifyDestroyed();
    }
}

@@ -248,18 +248,34 @@
 let 
-implements
+%7B%0D%0A    %0D%0A    private final
  App
@@ -291,23 +291,25 @@
 istener 
-%7B%0D%0A    
+listener;
 %0D%0A    pr
@@ -314,16 +314,23 @@
 private 
+static 
 MIDlet m
@@ -349,16 +349,23 @@
 private 
+static 
 Display 
@@ -374,16 +374,128 @@
 splay;%0D%0A
+    %0D%0A    public JecpApplication(ApplicationListener listener) %7B%0D%0A        this.listener = listener;%0D%0A    %7D%0D%0A    
 %0D%0A    pr
@@ -638,20 +638,24 @@
 pCanvas(
-this
+listener
 ));%0D%0A   
@@ -707,16 +707,25 @@
         
+listener.
 onPauseA
@@ -810,16 +810,25 @@
         
+listener.
 onDestro
@@ -870,12 +870,161 @@
 %0D%0A    %7D%0D
+%0A%0D%0A    public static MIDlet getMidlet() %7B%0D%0A        return midlet;%0D%0A    %7D%0D%0A%0D%0A    public static Display getDisplay() %7B%0D%0A        return display;%0D%0A    %7D%0D
 %0A%7D%0D%0A

Change JecpApllication class in JECP-ME