Getting started
This is the second installment in a four-part comprehensive introduction -- two tutorials and two articles -- to Java 2 Micro Edition (J2ME) and the Mobile Information Device Profile (MIDP). The first tutorial (see Resources) served as an introduction to MIDP, with particular attention to the components that comprise MIDP's high-level interface. We also discussed event-handling techniques on the high-level API and walked through a series of exercises designed to teach you, hands-on, about developing applications on the J2ME platform.
In this second tutorial, you will learn about the most important components of MIDP's low-level interface. We'll discuss the basics of creating and working with the Canvas and Graphics classes. The Canvas class is the backdrop of the low-level API, used to create and define the display area for your application. The Graphics class lets you draw shapes and images on the display area, or screen, as well as select different fonts for your text display. As with Part 1, we'll introduce each component and then build a MIDlet to demonstrate its capabilities. The tutorial will conclude with a brief overview of the Game API, which was introduced with MIDP 2.0.
Portions of this tutorial are used with permission from the book Core J2ME Technology and MIDP by John W. Muchow, published by Sun Microsystems Press and Prentice Hall.
This tutorial is intended for experienced Java programmers who would like to learn how to develop mobile applications using J2ME. The code examples are not particularly complex, but it is assumed that you understand how classes are created, inherited, and instantiated within the Java platform. You will also benefit from a working knowledge of using and creating Java Archive Files (JARs). See Resources for more information on using JARs.
Software and installation requirements
To complete this tutorial you will need to install JDK version 1.4 or greater, along with the J2ME Wireless Toolkit (WTK). The WTK download contains an IDE for creating Java applications, commonly called MIDlets, as well as the libraries required for creating them.
The WTK is contained within a single executable file. Run this file to begin the installation. It is recommended that you use the default installation directory. If you choose another directory, make sure that the path you select does not include any spaces.

