Coming soon: Swing for mobile Java, but better

Updates
- 8/18: Updated FAQ question on Java FX Mobile
- 5/4: Added note on Sprint WTK 3.3 support for LWUIT
- 5/4: Added notes on LWUIT support on non-MIDP platforms
Welcome LWUIT (Lightweight UI Toolkit)!
For years, Java ME developers have faced difficult choices when it comes to application UIs. Because of the multitude of platform and device features and differences there was really no common UI story - there is MIDP for CLDC and AWT for CDC, APIs like JSR 226 (SVG) and JSR 209 (AGUI), and finally a number of 3rd party toolkits such as J2ME Polish.
Now, it is definitely possible to develop very slick user interfaces based on some of this technology - but every approach has its limitations and downsides. In particular, what ends up happening is that developers and/or toolkit suppliers end up reinventing the wheel by creating a lot of common functionality over and over again - things like component models, rendering and font engines, layout managers, animations and transition effects, etc. APIs such as JSR 226 (SVG) and 209 (AGUI) are necessary in providing this functionality going forward but, as standards go, they are slow to spread into the device base and don't help developers address a large part of today's market.
Over the last two years Sun has worked on some internal projects that required rich applications UIs running on todays mid-range mass-market devices - platforms where forthcoming standards are not yet available. After investigating the options Sun decided to build a rich UI toolkit internally for that purpose. Over the last couple of months we've been showing the results to select partners and developers and the response has been extremely positive. Because we believe this toolkit is of significant value to the developer community at large Sun has decided to make it available as open source in the Java Mobile & Embedded Community to encourage use, feedback, and involvement by the community.
What is it?
LWUIT (the current project name - it may still change) is a library that developers simply bundle with their application. It is inspired by Swing and provides a rich, compelling, and consistent UI across a wide range of todays mass-market devices. It sits on top of MIDP 2.0 and implements a peer-less graphics and UI model in a compact package with small footprint and moderate performance requirements. Because it is simply a library that developers bundle with their application the deployment is familiar and easy and improvements to the library can be easily made available to the application by simply upgrading the library.
Update: LWUIT will also be available on other platforms such as CDC/FP/PBP. This means applications written to LWUIT will run on multiple platforms easily - meaning dramatically increased portability for developers.
LWUIT Key features:
- Swing-like MVC
- Layouts
- Pluggable look-and-feel and themes
- Fonts
- Touch screen support
- Animations and transitions
- Rich widgets
- 3D integration
- Painters
- External tools support
- I18N/L10N support
- Moderate performance and footprint requirements
- Multi-platform support
- SVG (scalable vector graphics) integration (forthcoming)
What does it look like?
A look at the screen shots (from left to right):
- The LWUIT demo application home screen running on phoneME Advanced on Windows Mobile
- An example of the theme support of LWUIT - the theme has been dynamically changed. What you cannot see is that the fish in the lower right is actually animated in the background while the application progresses.
- The same, unmodified LWUIT demo application home screen running on WTK 2.5.1
- An example of a consumer-services application built with LWUIT
What license will be used?
A key goal is broad adoption of LWUIT. We want to make it easy for developers to use and improve LWUIT and we are looking at liberal and well-known open source license choices. Details to be announced.
When and where will it be available?
LWUIT will be placed into the ME Application Developers Project in the Java Mobile & Embedded Community. We aim to release it very shortly - first as an early access binary and shortly thereafter as full source. More details to be announced.
Update: LWUIT is a key part of Sprint's new WTK 3.3 toolchain - to be released very shortly. This means developers using the Sprint tools will have LWUIT as a preinstalled option in the toolchain, including documentation and support by Sprint. For more information see the Sprint Application Developer program news.
Where can I learn more about LWUIT?
LWUIT will be announced at JavaOne next week in Jeet Kaul's Mobility General session on Tuesday at 3:20 pm. Also, a technical session was added last minute to the schedule:
- Tuesday, 4:40 pm - 5:40 pm
Finally, we will be demoing LWUIT on devices in several Sun booths such as the Java Mobile & Embedded Community booth in the Mobility Village.
FAQ:
- Why another Java ME UI toolkit?
Key design goals for LWUIT were to enable rich and compelling applications on todays targets mass-market phones combined with the familiarity of existing APIs (AGUI and Swing), ease of deployment, and a liberal open source license. We felt that LWUIT was unique and compelling enough to make it available to the general developer community. We are looking forward to your feedback and involvement.
- Update: Is LWUIT limited to MIDP platforms?
- Does LWUIT supersede/replace/make obsolete MIDP?
- Does LWUIT supersede/replace/make obsolete JSR 226 (SVG) or JSR 209 (AGUI)?
- Does LWUIT supersede/replace/make obsolete other UI toolkits such as J2ME Polish?
- How does LWUIT relate to Sun's Java FX Mobile?
More information and details will be released at JavaOne. Be sure to attend the TS-4921 session on LWUIT and visit our booths for demos. And watch the Java Mobile & Embedded Community front page for late-breaking news.
Cheers,
-- Terrence
- Login or register to post comments
- Printer-friendly version
- terrencebarr's blog
- 3323 reads






Comments
by terrencebarr - 2008-05-04 23:15
The library will be made available this week as part of the announcement at JavaOne. I'll let you know where to find it when it's available.-- Terrence
by immanuel_zhu - 2008-05-04 20:26
how can I get LWUIT this lib te develop j2me programby terrencebarr - 2008-05-04 10:01
sfitzjava,Not sure I understand the question. LWUIT is not specific to the underlying OS - it just requires MIDP. Maybe you are saying LWUIT exposes bugs in the Linux WTK MIDP implementation?
-- Terrence
by terrencebarr - 2008-05-04 10:00
vprise,Thanks for the comment. You're absolutely right - I've updated the blog.
-- Terrence
by terrencebarr - 2008-05-08 00:36
PS: The library has been released. See https://lwuit.dev.java.net/-- Terrence
by sfitzjava - 2008-05-01 10:45
Will it be available on the Linux WTK too? I saw a pre-release but it was on windows, and when I tried it on Linux had some issues.by claudiolmc - 2008-05-01 07:28
Great news!!by vprise - 2008-04-30 10:29
Great post Terrence. Minor correction to the AGUI point, you won't need to port applications to AGUI they would work seamlessly on top of AGUI since LWUIT is portable to CDC PBP/AGUI. It takes advantage of Java2D features such as anti-aliasing seamlessly.by terrencebarr - 2008-04-30 09:34
mikeazzi, Good point, thanks for asking. Will add. -- Terrenceby mikeazzi - 2008-04-30 08:42
Hi Terrence, Interesting project. If I may, I would like to add one more question to your LWUIT FAQ: Where does this fit within Sun's JavaFX Mobile strategy? With Sun shifting focus toward JavaFX, I am sure a lot of people would be wondering the same.