Saturday, July 2, 2011

Preview Of The New LWUIT Demo

Those of you who don't keep up to date with the trunk might not be aware of some of the new stuff going on in LWUIT and even for those of you who do I have some new features bringing the LWUIT demo up to date. Here is an updated version of the LWUIT demo with some new art live as a playable applet.
I updated the resolution to 800x480 to better represent newer devices (although this is entirely configurable and runs well in 240x320 and practically any other resolution). The icons are now multi-images allowing them to scale smoothly to 140x140 behemoths that show the vision of Martin (or UI designer) with much more detail.

To Use the applet just use the pointer for touch, the arrow keys/enter. F1 acts as a menu button (the applet is configured as a Menu button device not as a softkey device) and ESC acts as a back button.

Check out several of the demo features specifically:
1. The animation demo was rewritten to better represent our view of what constitutes an animation.
2. The layouts demo now animates nicely between layouts (highly addictive)
3. The Scrolling demo transitions nicely between list types (grid/horizontal/vertical) even when you are in the middle of scrolling...
4. The fonts demo allows manipulating text decorations and shows off toggle buttons.

There are obviously new themes and allot more going on under the hood which we can't really go into right now.


  1. Hi,

    Shai I am having a problem with custom dialogs in lwuit. Some time they remain stuck on the screen and not disposing properly.

    Please tell me the correct way to dispose a custom dialog


  2. Thats a cool demo there! LWUIT just keeps getting better and better!

  3. Custom dialogs work fine for me. You need to use the EDT when working with LWUIT. Also keep in mind that show() is a blocking method unless you are creating a modeless dialog.

  4. hiwhere can we found the sources of this new demo?
    thx a lot !

  5. Its all in the Apps directory under SVN

  6. I have a suggestion when saving a file in the Resource Editor.

    The issue is that when saving the Home Form is hard encoded on StateMachineBase (specially on startApp and createWidget methods) making setHomeForm useless. I think that wold be a better approach to replace the hardcoded String with a getHomeForm() call on that methods.

    I couldn't find the place to post this on Sorry for the inconvenience.



  7. The first form isn't a home form, its just the first form shown and its usually a splash screen for our apps. Its not exactly hardcoded.
    You can replace the name of everything in the properties file located in the project root directory.
    Furthermore you can override both showForm() and createContainer() to do whatever you like e.g. set the first form to be "FormThatDoesntExist" and when showForm or createContainer are invoked with that form just replace it to whatever you want and call super.

  8. Best place for something like this is in the issue tracker where you can file an RFE with a simple example attached of what you are trying to accomplish and why you are failing.
    The issue tracker can be reached on