Friday, February 10, 2017

Java 2 Micro Edition Case Study

Java 2 Micro Edition Case Study


Extending one’s knowledge of Java to J2ME is very easy. Every program in J2ME is called a midlet and extends from the midlet class. Here is a sample program in NetBeans using the CLDC configuration and the MIDP 2.0 profile.

As evident from the screen-shots, the constructors in both the programs are very much similar. A few differences exist in the both such as the import statements in J2ME where two packages - midlet and lcdui are imported. Further an alert object is constructed to display the message.

Three important functions are present in every J2ME program. They are -

startAppCalled whenever the application is started
pauseAppCalled whenever the application is paused
destroyAppCalled whenever the application is terminated



Available link for download