Skip Headers
Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.2 for Windows
  Go To Table Of Contents
Go To Index


12 Lightweight UI Toolkit

The Lightweight UI Toolkit (LWUIT) is a lightweight widget library inspired by Swing but designed for constrained devices such as mobile phones and set-top boxes. Lightweight UI Toolkit supports pluggable theme-ability, a component and container hierarchy, and abstraction of the underlying GUI toolkit. The term lightweight indicates that the widgets in the library draw their state in Java source without native peer rendering.

12.1 LWUIT and the Java ME SDK

LWUIT is an open source project whose source is available at

Java ME SDK 3.2 ships with the LWUIT 1.5 library, which is installed as a NetBeans package. For information on this release, see the product page at:

The Lightweight UI Toolkit Developer's Guide is available in PDF and HTML formats:



As an open source project, LWUIT has an independent release schedule. The Java ME SDK Update Center updates LWUIT when an official binary is released.

It is possible that you might want to use a development version of the LWUIT library. You can add a newer version as described in Section 12.3, "Add a Different LWUIT Library".

12.2 LWUIT Resource Editor

The Resource Editor is an independent GUI tool for opening, creating, and editing resource packages for LWUIT.

To start the resource editor, go to the project view and select a project that uses the LWUIT library, then select Tools>Java ME > LWUIT Resource Editor.

The Resource Editor has its own help, and tutorials that are accessed from the Resource Editor's Help menu. These articles link back to the LWUIT blog. For traditional documentation, see the "Resources" chapter in the Developer's Guide mentioned in Section 12.1, "LWUIT and the Java ME SDK".

12.3 Add a Different LWUIT Library

The LWUIT library can be added to any CLDC/MIDP or CDC/PBP Project. A library has typically been installed as a NetBeans module.

  1. Right-click on a project and select Properties.

  2. In the Build category, select Libraries & Resources, and click the Add Library... button.

  3. In the Add Libraries window, scroll down and select LWUIT and click Add Library.

    You can see the package under Libraries and Resources.

If you have a created a Zip or JAR from the unreleased LWUIT source you can add it in a similar fashion by pressing the Add Jar/Zip button.

12.4 LWUIT Demos

This release provides new and updated demos and sample code. Most of these demos are self-evident user interface samples.


Many LWUIT demos access common internet sites and services through publicly available APIs. To see the demos working as intended you might have to change your proxy settings or create an exception in your antivirus software.