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 developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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:  18225 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



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

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=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers