March 2002
Intermediate to advanced
400 pages
8h 44m
English
Now that you understand the application execution lifecycle, it's time to look at the source code of a simple MIDlet. You might have already surmised that I'm going to start by showing you the simplest MIDlet—the MIDP version of the inveterate “Hello World” program. Listing 3.1 shows the source code for the first version of the HelloWorld MIDlet.
import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; import javax.microedition.midlet.MIDlet; /** Creates the "Hello world" program in J2ME MIDP. Note that the class must be public so that the device application management software ... |
Read now
Unlock full access