C:\eclipse\workspace\HelloWorld\src\HelloWorldMIDlet.java
 1 import javax.microedition.lcdui.*;
 2 import javax.microedition.midlet.*;
 3 
 4 public class HelloWorldMIDlet extends MIDlet
 5 {
 6     public HelloWorldMIDlet()
 7     {
 8     }
 9 
10     public void startApp()
11     {
12         Displayable current = Display.getDisplay(this).getCurrent();
13         if(current == null)
14         {
15             HelloScreen helloScreen = new HelloScreen(this, "Hello World.");
16             Display.getDisplay(this).setCurrent(helloScreen);
17         }
18     }
19 
20     public void pauseApp() 
21     {
22     }
23 
24     public void destroyApp(boolean b) 
25     {
26     }
27 
28     void exitRequested()
29     {
30         destroyApp(false);
31         notifyDestroyed();
32     }
33 }
34