This document describes how to work with the Lightweight User Interface toolkit.

Before You Read This Document

This guide is intended for developers creating Mobile Information Device Profile (MIDP) applications. This book is a tutorial in Lightweight UI Toolkit programming over MIDP. You should already have basic knowledge about Java™ UI libraries (for example, AWT and SWING) and understand how to use the Mobile Information Device Profile (MIDP) and the Connected Limited Device Configuration (CLDC).

For current discussion of LWUIT issues, see these online resources:

If you need help getting started with the Java programming language, try the New to Java Center:

For a quick start with MIDP programming, read Learning Path: Getting Started with MIDP 2.0:

The following sites provide technical documentation related to Java technology:

How This Document Is Organized

This guide contains the following chapters and appendices:

Chapter 1 introduces the Lightweight UI Toolkit library.

Chapter 2 describes how to use Lightweight UI Toolkit widgets.

Chapter 3 explains how to use Lists.

Chapter 5 describes how to use Dialogs.

Chapter 6 shows how you can use Layouts.

Chapter 7 explains how to use Painters.

Chapter 8 explains how to use the Style object.

Chapter 10 describes theme elements.

Chapter 11 describes the Theme Creator utility.

Chapter 12 describes how to use Transitions and Animations.

Chapter 13 covers 3D integration.

Chapter 14 details how to use logging.

Chapter 15 describes how to author a new component from scratch.

Chapter 16 discusses general and device‐specific portability issues.

Appendix A summarizes frequently asked questions about LWUIT.

Shell Prompts

Shell Prompt
C shell machine-name%
C shell superuser machine-name#
Bourne shell and Korn shell $
Bourne shell and Korn shell superuser #

Typographic Conventions

Typeface Meaning Examples
AaBbCc123 The names of commands, files, and directories; on‐screen computer output Edit your.login file.

Use ls -a to list all files.

% You have mail.

AaBbCc123 What you type, when contrasted with on-screen computer output % su


AaBbCc123 Book titles, new words or terms, words to be emphasized. Replace command-line variables with real names or values. Read Chapter 6 in the User’s Guide.

These are called class options.

You must be superuser to do this.

To delete a file, type rm filename.

Note - Characters display differently depending on browser settings. If characters do not display correctly, change the character encoding in your browser to Unicode UTF-8.

Related Documentation

TABLE P-1 lists documentation related to this product.

TABLE -1   Recommended Documentation
Topic Title and URL
JSR 118, MIDP 2.0 Mobile Information Device Profile

JSR 139, CLDC 1.1 Connected Limited Device Configuration

JSR 184, 3D Graphics Mobile 3D Graphics API for J2ME

AWT docs
Swing docs

Sun Welcomes Your Comments

Sun is interested in improving our documentation and welcomes your comments and suggestions. Email your feedback to: