Introducing a Lightweight UI Toolkit: Bringing Desktop Development into Java ME
Please, feel free to open weather.res file in your Resource Editor and play with different combinations of colors, fonts, and images. Maybe some of you wonder why I have included all the images inside the resource file instead of downloading them (the RSS feed has some image URLs). Basically, I did this for two reasons: to show you how to include images, and secondly, some mobile operators control how much bandwidth is used by customers, and I wanted to consume the minimum possible.
Conclusion
You have learned the basics of LWUIT: using containers and forms and placing components on them following a layout. You also started to empower your application with themes, fonts, and images. In the next article, I will show you some advanced concepts, such as Lists, dialogs, tabs, and animations.
Download the Code
You can download the code that accompanies this article here.
References
- [1] LWUIT home: https://lwuit.dev.java.net/
- [2] Yahoo Weather: http://weather.yahoo.com/
- [3] Yahoo RSS Weather description: http://developer.yahoo.com/weather/
- [4] Nice weather icon images (for a KDE application): http://liquidweather.net/icons.php
- [5] What is Java 2 Micro Edition? by Eric Giguère: http://www.developer.com/ws/j2me/article.php/1378921
- [6] KXML home: http://kxml.sourceforge.net/
- [7] First of a series of articles teaching JavaME: http://www.developer.com/java/other/article.php/3747896
- [8] Composite pattern: http://en.wikipedia.org/wiki/Composite_pattern
About the Author
Ibon Urrutia is a Spanish IT Engineer, with wide experience in JavaME applications targeted to be used in many devices. Nowadays, he is working for MDTEC http://www.mdtec.net, participating in a complete JavaME framework with advanced user interface functionalities, TagsMETM, http://www.tagsme.com. He also is member of Netbeans Dream Team, http://wiki.netbeans.org/NetBeansDreamTeam.
Page 7 of 7
This article was originally published on July 17, 2008