Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

J2ME 101, Part 1: Introduction to MIDP's high-level user interface

John Muchow, Author
John Muchow is a contributing developerWorks author.

Summary:  This is the first installment of a comprehensive four-part introduction to Java 2 Micro Edition (J2ME) and the Mobile Information Device Profile (MIDP). The series will consist of two tutorials and two companion articles. In this first tutorial, you will learn about the essential components of J2ME, with a primary focus on MIDP. The focus is on MIDP's high-level user interface, with a step-by-step introduction to the components that facilitate the main interaction between the user and the device display.

Date:  20 Nov 2003
Level:  Introductory PDF:  A4 and Letter (811 KB | 63 pages)Get Adobe® Reader®

Activity:  28963 views
Comments:  

Getting started

What is this tutorial about?

This is first 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). In this tutorial you will learn about the essential components of J2ME, with a primary focus on MIDP. We'll focus here on MIDP's high-level user interface, with a step-by-step introduction to the components that facilitate the main interaction between the user and the device display. These components include TextField, Gauge, and DateField, among others. You will also learn about event-handling techniques for the high-level API, using both Command and Item objects.

In the second part of the tutorial you will learn how to work with MIDP's low-level user interface. We'll walk through exercises that include creating and drawing on a canvas, working with fonts, and drawing shapes. As part of this discussion you will become familiar with all the J2ME components that work directly with the device display.

Two companion articles round out this introduction to J2ME. The first article will introduce you to the Record Management System (RMS), which is the persistent storage environment within MIDP. The second article will cover networking support for J2ME. You'll learn about the Generic Connection Framework, opening network connections and communicating with remote systems, talking with Java Servlets, and a few other goodies.

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. Copyright 2002 Sun Microsystems Inc.


Should I take this tutorial?

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.

1 of 9 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=131705
TutorialTitle=J2ME 101, Part 1: Introduction to MIDP's high-level user interface
publish-date=11202003
author1-email=
author1-email-cc=