Book Image

LWUIT 1.1 for Java ME Developers

By : Biswajit Sarkar
Book Image

LWUIT 1.1 for Java ME Developers

By: Biswajit Sarkar

Overview of this book

<p>Writing appealing cross-device applications today in Java ME is challenging as implementation differences in fonts, layout, and menus can make your application look and behave very differently on different devices. So far, the only way out has been low-level programming with its associated complexity.<br /><br />The Lightweight UI Toolkit (LWUIT), an open source Java library, offers Java ME developers an easy-to-use API for creating impressive user interfaces with a device-independent look and feel. The LWUIT library contains many components and tools for bringing consistency and visual gloss to the user interface of your applications, and this book will take you through all of this, to help you get the user interfaces you want.<br /><br />Java ME allows us to write applications that are, generally speaking, portable across a wide range of small devices that support the platform. While the basic functionalities usually work well on all supported devices, the area that does pose problems for developers is the User Interface. Native implementations of javax.microedition.lcdui &ndash; the primary API for UIs in Java ME &ndash; differ so widely from one device to another that maintaining a device-independent and uniform look and feel is virtually impossible. Another problem with the javax.microedition.lcdui package is that it does not support components and capabilities that can fully satisfy present day user expectations. The Lightweight UI Toolkit is the solution to these problems. LWUIT offers a wide range of components with a device-independent look and feel for building UIs. While some of these widgets are also available under lcdui, there are a number of new ones too. These additions enable application developers to design UIs that can come very close to their desktop counterparts in terms of visual sophistication and LWUIT is not just about new components either. The API supports a whole range of new functionalities (like Theming and Transitions) too.<br /><br />This book takes Java ME developers through the library, with examples showing how to use the main components and functionalities. It also goes beyond a description of what is available by showing how to extend the library by plugging in custom-built classes.</p>
Table of Contents (18 chapters)
LWUIT 1.1 for Java ME Developers
Credits
About the Author
About the Reviewers
Preface

Deploying an application


When we use the Build button on the SWTK to compile an application, the required class files are generated. This allows the application to be executed on the SWTK. However, to deploy an application into an actual device, the class files cannot be used. What you need is a JAD file and a JAR file. To generate these files, use the Package button. The two files will be created and placed in the bin folder of the application. To load these files onto a phone, you will need the connecting cable and the software recommended by the device manufacturer. Usually, both of these come with the handset. In case you do not have the necessary hardware and software, you can get them from third-party vendors too. Handsets that support Bluetooth or infrared interfaces can load programs through these connections.

A second way of loading applications onto a phone is through the Over-the-Air Provisioning (OTA) function. This allows you to download an application from a remote server over...