You Are Here:

Community: Blogs

Who am I?

dcrocha

I'm a software engineer with 10 years experience in application development, having worked with Web (Perl, PHP, JavaScript, JSP, Servlets, Flash, ASP), Enterprise (Java EE) and Mobile software (Symbian C++, Java ME, Flash Lite, Python). Currently working as Forum Nokia Technology Expert with many exciting technologies.

Check my blog for more articles and fun stuff: http://rawsocket.org

 

Calendar

« May 2008 »
Mo Tu We Th Fr Sa Su
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
 

Daniel Rocha's Forum Nokia Blog

Want a sexy UI in your Java MIDlet? It's now possible with LWTUI! (with video)

dcrocha | 14 May, 2008 22:23

Sexy UIs are all the rage today, right? FlashLite apps, WRT Widgets, WidSets, all of them have distinctive user experiences which differ greatly from the way we interact with native S40 and S60 applications. More colors, more animations, better usability, all making up a great way for developers to differentiate their applications and make them more attractive to the end user.

In Java MIDlets however, you are stuck with a very poor UI toolkit, the LCDUI, which has very few components and few options on how to alter their appearance; most of the time you're giving hints to the underlying implementation regarding the way you want the components to be displayed. Even if you do so, however, there's still a big chance your hints will be ignored and the UI will be rendered differently on each device. This can be a pain if you are developing for many different phones, with different screen sizes, input methods and form factors. Actually, to be fair, this can be a pain even if your target is a single device.

To circumvent these challenges, developers had either to developer their own UI toolkits, based on raw Canvasses, or use a 3rd. party toolkit such as J2ME Polish, which is great but requires a paid license to develop commercial applications, and this can be an unbearable cost to a small developer.

Searching the web and some mailing lists, I found this very interesting project, called LTWUI (Lightweight UI Toolkit), which is a cross-device UI toolkit created to provide developers with the possibility of developing compelling user interfaces without writing painful low-level Canvas code. It's based on Swing programming paradigm and it's key functionalities are:


 LWTUI demo midlet running on E61i

  • Swing Like MVC
  • Layouts
  • PLAF & Themes
  • Fonts
  • Touch Screen
  • Animations & Transitions
  • Rich widgets
  • 3D Integration
  • Painters
  • Modal Dialogs
  • External Tools
  • I18N/L10N

It's still in Early Access release but you can go to the project page and download it so you can play around with the toolkit and run its demos on emulators and real devices. The great thing is that the library is released under the Sun Licensing Agreement (SLA) which makes it usable by commercial applications without having to pay any fee. 

I ran the LWTUIDemo midlet on my Nokia E61i and N95 and it worked beautifully. It's a bit slow though, but nothing that compromises the user experience. I recorded a video of LWTUI running on my N95, so you can see what's up for use in your Java apps; I guarantee you will enjoy it.

Last but not least, the project is open source, so you can contribute to it, just go to the project page for more details on how to participate.

Here's the video, enjoy it:

 

[]s
Daniel 

 

RSSComments

supported devices ?

njzk2 | 15/05/2008, 08:44

Hi Daniel, thanks for the tip.
Do you have infos on the supported devices, i couldn't find specific informations on the site ?

All with JSR 184

dcrocha | 15/05/2008, 13:38

dcrocha

Hi Njzk2, I didn't see a table of supported devices either, but as they say "cross-device" and the library is pure Java, I assume it runs on every device, which is great. I for example tested with success in N95, E61i, E61, 6131 (!) and many others, be them S40 or S60. How great is that?

Re: Want a sexy UI in your Java MIDlet? It's now possible with LWTUI! (with video)

WebSeed | 15/05/2008, 14:22

Thanks for this info Daniel. J2ME had been crying out for a decent UI library. Native UI components are very poor and feature-poor. Other libraries I've tried invariably suffer from fragmentation issues, or they concentrate on gimmicky eye candy rather than building a solid GUI foundation.

I actually really like the approach taken by WidSets whereby you can define the look of the UI components using CSS - just wish it was a available also as a 3rd party library for J2ME developers.

Anyway, will try LWUIT out now...

LWUIT Supported Devices

vprise | 15/05/2008, 17:38

Hi Daniel,
thanks for the great writeup and video ;-)

A few points raised in your comments article:
1. Its LWUIT = Lightweight UI Toolkit not LWTUI.

2. We don't require JSR 184, this is purely for the 3D transitions. The LWUITDemo works on MIDP 2.0 CLDC 1.1 devices and if 184 is unsupported the transition options for 3D won't appear.

3. We had success with reasonable devices from Motorola, Nokia, SE etc. Blackberry is currently broken but will get fixed in the next drop. Some Samsung, LG, WinMo etc. devices work with odd performance.

4. For some reason S60 devices are slower than they should be (even slower than S40 devices for some tasks). We are investigating the S60 performance issues and hope to resolve them soon.

5. We have a CSS like themeing engine that allows you to download a theme OTA and install it on the fly. We supply a designer oriented tool that allows your UI developers to customize the look and feel of your application.

The library will be open source this summer, please feel free to ask questions and join the mailing list in our java.net project.

Thanks.
Shai.

Re: Want a sexy UI in your Java MIDlet? It's now possible with LWTUI! (with video)

mapesteguia | 15/05/2008, 19:40

Hi Daniel, we have a demo project running on j2me polish and we'll try to switch it to LWUIT, however my question is more basic. Is there any way using J2ME to "customize" menues for s40 platform devices? this means to add options for instance in the address book in order to have the ability to lauch a middlet from it?. Imagine an http chat app. developed in a middlet that can be launched directly from the address book of an s40 device adding an extra option in the menu bar.

Thanks in advance. Martín.

Re: Want a sexy UI in your Java MIDlet? It's now possible with LWTUI! (with video)

matbal | 16/05/2008, 07:38

Thanks for pointing out LWUIT!

@WebSeed: Did you already try the mentioned J2ME Polish? It uses CSS for defining layouts and formats.

@mapesteguia: Unfortunately, I'm quite sure that there's no way to modify system menus using J2ME.

Re: Want a sexy UI in your Java MIDlet? It's now possible with LWTUI! (with video)

WebSeed | 16/05/2008, 08:18

I've just tried LWUIT. Lots of promise, but too slow on S60 to be useful at the moment. If this can be sorted out, I'll definitely look to use it in the future. As for 3D cube transitions etc. (using M3G) this seems a bit gimmicky in my opinion - would prefer to see basic functionality speeded up. Whenever I see an interesting feature my first thoughts turn to how this is going to break compatility with certain phone platforms etc.

@matbal: Yes, I've tried Polish in the past and even used it for one or two projects and yes, you're right, it uses CSS to define look and feel. However, there seemed to be some implementation problems with the platform - for instance, I could crash my phone using the example applications by rapidly going to/from certain screens. I kind of felt like too much emphasis was placed on the development of new stuff, whilst the base functionality was still slightly buggy (I've not tried it within last 6 months so might be better now).

Re: Want a sexy UI in your Java MIDlet? It's now possible with LWTUI! (with video)

bbeaulant | 20/05/2008, 06:05

I'm happy to see this excitement arround JavaMe UI toolkits. I recently post my own UI toolkit based on XML and CSS approach : Kuix (http://www.kalmeo.org/projects/kuix) and it could be very interesting for the community to be able to choose the toolkit according to its needs.

I took a look at the demo, and it seems to be promising, but very slow at the moment event on the wtk emulator. The part I'd prefer are the 3D transitions.

Re: Want a sexy UI in your Java MIDlet? It's now possible with LWTUI! (with video)

Larry101 | 02/06/2008, 11:59

Just came across this by accident and can't believe I haven't noticed it before. JavaMe has been crying out for something like this for ages. I've just spent ages writing Canvas code and my own components to get a decent looking UI and it was a painful experience. Memory usage looks pretty good on the demo (between 2 and 3 MB it seems). It seems to hand the CPU a bit of a beating though. And I especially like the fonts and transitions. Pity about the speed. Would be interested to see how it performs in a slightly less ambitious example.

hello

tahco | 11/10/2008, 11:52

i whant theme creator for make theme n95
thanks.

You must login to post comments. Login
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxAE20blogE20aboutE20everythingE20thatE20soundsE20interestingE20toE20meE20andE20ForumE20NokiaE20audienceE2eE20dcrochaE20E7cE2014E20MayE2cE202008E2022E3a23E20SeE78yE20UIsE20areE20allE20theE20rageE20todayE2cE20rightE3fE20FlashE4citeE20appsE2cE20WE52TE20WidgetsE2cE20WidSetsE2cE20allE20ofE20themE20haveE20distinctiveE20userE20eE78periencesE20whichE20differE20greatlyE20fromE20theE20wayE20weE20interactE20withE20nativeE20S40E20andE20S60E20applicationsE2eE20MoreE20colorsE2cE20moreE20animationsE2cE20betterE20usabilityE2cE20allE20makingE20upE20aE20greatE20wayE20forE20developersE20toE20differentiateE20theirE20applicationsE20andE20makeE20themE20moreE20attractiveE20toE20theE20endE20userE2eE20InE20JavaE20MIE44E2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fblogE2fdanielE2drochasE2dforumE2dnokiaE2dblogE2f2008E2f05E2f14E2flwtuiE5ftoolkitX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxE44anielE20E52ochaE27sE20ForumE20NokiaE20BlogE20E7cE20WantE20aE20seE78yE20UIE20inE20yourE20JavaE20MIE44letE3fE20ItE27sE20nowE20possibleE20withE20E4cWTUIE21E20E28withE20videoE29X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfnTypeZBlogContentQ qdcZtypeQUqfnTypeZBlogE45ntryQ qdcZtypeQUqfnTypeZCommunityContentQ qdcZtypeQUqfnTypeZE52esourceQ qdcZtypeQUqfnTypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxAE20blogE20aboutE20everythingE20thatE20soundsE20interestingE20toE20meE20andE20ForumE20NokiaE20audienceE2eE20dcrochaE20E7cE2014E20MayE2cE202008E2022E3a23E20SeE78yE20UIsE20areE20allE20theE20rageE20todayE2cE20rightE3fE20FlashE4citeE20appsE2cE20WE52TE20WidgetsE2cE20WidSetsE2cE20allE20ofE20themE20haveE20distinctiveE20userE20eE78periencesE20whichE20differE20greatlyE20fromE20theE20wayE20weE20interactE20withE20nativeE20S40E20andE20S60E20applicationsE2eE20MoreE20colorsE2cE20moreE20animationsE2cE20betterE20usabilityE2cE20allE20makingE20upE20aE20greatE20wayE20forE20developersE20toE20differentiateE20theirE20applicationsE20andE20makeE20themE20moreE20attractiveE20toE20theE20endE20userE2eE20InE20JavaE20MIE44E2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fX qfnZtopicQUqfnTopicZeswtQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZj2meQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZjavaQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZseriesE5f40QRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZseriesE5f60QRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtypeQUqfnTypeZBlogContentQ qfnZtypeQUqfnTypeZBlogE45ntryQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZE52esourceQ qfnZtypeQUqfnTypeZWebpageQ qfnZupdatedQDx2008E2d06E2d02X qfnZuserE5ftagQSxeswtX qfnZuserE5ftagQSxjavaX qfnZuserE5ftagQSxjavaE2dmeX qfnZuserE5ftagQSxs60X qfnZuserE5ftagQSxseriesE2d40X qmarsZdescriptionQSxAE20blogE20aboutE20everythingE20thatE20soundsE20interestingE20toE20meE20andE20ForumE20NokiaE20audienceE2eE20dcrochaE20E7cE2014E20MayE2cE202008E2022E3a23E20SeE78yE20UIsE20areE20allE20theE20rageE20todayE2cE20rightE3fE20FlashE4citeE20appsE2cE20WE52TE20WidgetsE2cE20WidSetsE2cE20allE20ofE20themE20haveE20distinctiveE20userE20eE78periencesE20whichE20differE20greatlyE20fromE20theE20wayE20weE20interactE20withE20nativeE20S40E20andE20S60E20applicationsE2eE20MoreE20colorsE2cE20moreE20animationsE2cE20betterE20usabilityE2cE20allE20makingE20upE20aE20greatE20wayE20forE20developersE20toE20differentiateE20theirE20applicationsE20andE20makeE20themE20moreE20attractiveE20toE20theE20endE20userE2eE20InE20JavaE20MIE44E2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfnTypeZBlogContentQ qrdfZtypeQUqfnTypeZBlogE45ntryQ qrdfZtypeQUqfnTypeZCommunityContentQ qrdfZtypeQUqfnTypeZE52esourceQ qrdfZtypeQUqfnTypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ