Free Sample
+ Collection

LWUIT 1.1 for Java ME Developers

Starting
Biswajit Sarkar

Create great user interfaces for mobile devices
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847197405
Paperback364 pages

About This Book

  • Make your applications stand out with dazzling graphics that look and behave the same on different mobile devices
  • Log information on the runtime behavior of your program
  • Write applications with attractive visual effects like transitions and animations
  • Use localization so that your applications can adapt to different languages and locales

Who This Book Is For

This book is for Java ME developers who want to create compelling user interfaces for Java ME applications, and want to use LWUIT to make this happen

Table of Contents

Chapter 1: Introduction to LWUIT
Why we need the LWUIT
LWUIT overview
Widgets
The underlying support elements
Functionalities
The Basic architecture
LWUITImplementation—the foundation of LWUIT
The Display class
Summary
Chapter 2: Components
The LWUIT bundle
Getting equipped
Hello LWUIT!
Deploying an application
The Component class
The Graphics class
Summary
Chapter 3: The Container Family
The Container
The form
The Dialog
The Calendar
The TabbedPane
Style for the future
Summary
Chapter 4: The Label Family
The Border class
The Label
The Button class
The CheckBox
The RadioButton and ButtonGroup
Summary
Chapter 5: List and ComboBox
The list
The ComboBox
Summary
Chapter 6: TextArea and TextField
The TextArea
The TextField class
Summary
Chapter 7: Arranging Widgets with Layout Managers
Layout class
The LayoutStyle class
BorderLayout
BoxLayout
CoordinateLayout
FlowLayout
GridLayout
GroupLayout
Summary
Chapter 8: Creating a Custom Component
The making of a component
Enhancements
Summary
Chapter 9: Resources Class, Resource File and LWUIT Designer
The LWUIT Designer
The Resources class
The SampleResource demo
Summary
Chapter 10: Using Themes
Working with theme files
Theming custom components
Manual styling versus theming
Theming on the fly
New version of the LWUIT Designer
Summary
Chapter 11: Adding Animations and Transitions
Animations
Transition
Authoring transitions
Summary
Chapter 12: Painters
The Painter interface
The DemoPainter application
Drawing a multi-layered background
Using a glass pane
Summary
Chapter 13: Effects and Logging— Useful Utilities
Using Effects
Logging with LWUIT
Customizing Log
Summary

What You Will Learn

  • Customize the way common components appear on screen for a unique look and feel
  • Add user interface elements to your applications and learn how to style them
  • Assemble sophisticated interfaces using containers, labels, and lists
  • Enhance the organization of your interface using layout managers
  • Add animations and transitions to your application
  • Create a theme to ensure visual coherence in your application
  • Use painters and painter chains for attractive backgrounds and superimposed patterns with components
  • Create resources with the LWUIT Designer
  • Build custom components by extending Component class Debug applications using the Log class

In Detail

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.

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.

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 – the primary API for UIs in Java ME – 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.

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.

Authors

Read More