|Oracle® Java Micro Edition Software Development Kit Developer's Guide
Release 3.2 for Eclipse on Windows
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.
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 plugin. 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 9.3, "Add a Different LWUIT Library."
The Resource Editor is an independent GUI tool for opening, creating, and editing resource packages for LWUIT. To obtain the Resource Editor, go to
http://www.oracle.com/technetwork/java/javame/javamobile/download/lwuit/index.html, download the distribution, and use the tool that is included there.
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 9.1, "LWUIT and the Java ME SDK."
To add the LWUIT library to an Eclipse project, follow these steps:
Choose Project > Properties to open the Project Properties dialog.
Select the Java Build Path category.
Select the Libraries tab.
Press Add External JARs then browse to the appropriate LWUIT JAR file for the platform.
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.
From the menu, select Help for an explanation of this demo.
This application has demos for many features. From the Menu choose About for a description of the demo. Choose a demo and press the Help soft button for an explanation.
This application implements IO features. For example, type LWUIT in the Search box, choose blog from the Type menu, and press Go. Click the search results to load the page into your system's default browser.
This demo features a search performed by distance, title, rating, or relevance. Search results can be mapped. To "makeover" the demo by choose a different theme from the Menu.
This demo tests drawing speed for different components. Press the Start button to cycle through a series of animations. To change the performance you can edit the frame rate in SpeedMIDlet.java. You can also affect the performance by changing the emulator's heap size. In the Device Selector, right-click on the device, select Properties from the context menu, and change the Heapsize value.
This application shows a contacts list and provides date and time information for contacts displayed on the home page. Use + to add contacts and - to remove them. Press the sun symbol to toggle the time format between 24 hour time and civilian time.
The demo is a simple tip calculator. The default service is restaurant staff. To change the service type, click the up arrow to highlight the service types. Use the right or left arrows to highlight a service type, then click the select button.