<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4691915549420037229</id><updated>2012-02-03T11:59:24.697-08:00</updated><category term='LWUIT Blackberry JavaOne'/><category term='LWUIT J2ME JavaME AJAX Mobile2.0 Makeover SVG'/><category term='LWUIT J2ME JavaME RadioButton CheckBox ComboBox LookAndFeel'/><category term='LWUIT J2ME JavaME Bugs Issues'/><category term='LWUIT J2ME JavaME Spinner'/><category term='LWUIT J2ME JavaME HD2 HTC'/><category term='LWUIT J2ME JavaME WeakReference'/><category term='LWUIT J2ME JavaME applications'/><category term='LWUIT J2ME JavaME Testing Scripting Automation'/><category term='LWUIT J2ME JavaME HTML'/><category term='LWUIT J2ME JavaME Video eye candy'/><category term='LWUIT J2ME JavaME Drop BlackBerry'/><category term='LWUIT J2ME JavaME Ovi JavaVerified'/><category term='LWUIT J2ME JavaME articles transitions animations'/><category term='LWUIT J2ME JavaME Pimp 3D Transition'/><category term='LWUIT J2ME JavaME Table Tree Model Component Composite Container'/><category term='LWUIT'/><category term='LWUIT J2ME JavaME LWUIT Designer Resource Editor'/><category term='LWUIT ResourceEditor tutorial'/><category term='LWUIT J2ME JavaME License GPL+CPE SLA'/><category term='LWUIT J2ME JavaME Pimp Effect round border'/><category term='LWUIT J2ME JavaME BlackBerry RIM Musix TriPlay majimob'/><category term='LWUIT J2ME JavaME Books'/><category term='LWUIT J2ME JavaME Android NexusOne'/><category term='LWUIT J2ME JavaME Featured Apps'/><category term='LWUIT J2ME JavaME HTML CSS'/><category term='JavaFX Mobile J2ME JavaME'/><category term='LWUIT J2ME JavaME PushingPixels Cookbook'/><category term='LWUIT J2ME JavaME Coordinate Layout'/><category term='LWUIT J2ME JavaME GIF Animation'/><category term='LWUIT J2ME JavaME Maps Guidebee'/><category term='LWUIT JavaOne Pimp'/><category term='LWUIT J2ME JavaME applications emoze'/><category term='LWUIT J2ME JavaME Styles'/><category term='LWUIT J2ME JavaME Biswajit Sarkar'/><category term='LWUIT J2ME JavaME Comverse emoze Emblaze'/><category term='LWUIT J2ME JavaME preprocessor'/><category term='LWUIT J2ME JavaME TextField Input'/><category term='LWUIT J2ME JavaME Musix Pelephone TriPlay'/><category term='LWUIT Resource Editor Tutorial JavaME J2ME MIDP Android Blackberry RIM Photoshop'/><category term='LWUIT J2ME JavaME Nuux'/><category term='LWUIT J2ME JavaME Makeover Series40 Nokia'/><category term='LWUIT J2ME JavaME Demo'/><category term='LWUIT J2ME JavaME YouTube Device Touch'/><category term='LWUIT J2ME JavaME applications MajiPlayer majimob'/><category term='LWUIT ResourceEditor tutorial LWUITDesigner'/><category term='LWUIT J2ME JavaME Applications Featured Apps'/><category term='S60 Debugging System.out printStackTrace log redirect'/><category term='LWUIT J2ME JavaME Speed Samsung'/><category term='LWUIT GUIBuilder'/><category term='BlackBerry RIM VerificationError'/><category term='LWUIT J2ME JavaME Release'/><category term='LWUIT J2ME JavaME TextField List Lost'/><category term='LWUIT J2ME JavaME Matisse GUIBuilder YouTube'/><category term='LWUIT J2ME JavaME Tree Model Component Composite Container'/><category term='LWUIT J2ME JavaME Slider Progress'/><category term='LWUIT J2ME JavaME Touch Thumb Android'/><category term='LWUIT J2ME JavaME MajiPlayer majimob applications'/><category term='LWUIT J2ME JavaME Porting'/><category term='LWUIT J2ME JavaME articles ResourceEditor Styles Themes'/><category term='LWUIT J2ME JavaME Table'/><category term='LWUIT J2ME JavaOne'/><category term='LWUIT J2ME JavaME Swing Presentation Evangalism'/><category term='LWUIT J2ME JavaME CDC TV'/><category term='LWUIT GUIBuilder ResourceEditor tutorial Photoshop PSD'/><category term='LWUIT J2ME JavaME Makeover'/><category term='LWUIT J2ME JavaME BlackBerry RIM'/><category term='LWUIT J2ME JavaME Pimp Effect'/><category term='LWUIT J2ME JavaME LWUIT4IO'/><category term='LWUIT J2ME JavaME Style Compatibility ResourceEditor'/><category term='LWUIT J2ME JavaME Buttons Rounded customizeui'/><category term='LWUIT J2ME JavaME SubMenus Extending Dialog'/><category term='LWUIT J2ME JavaME Borders Painters'/><category term='LWUIT J2ME JavaME Grow Container'/><category term='DailyShow'/><category term='LWUIT J2ME JavaME Matisse GUIBuilder'/><category term='LWUIT Resource Editor Tutorial JavaME J2ME MIDP Android Blackberry RIM'/><category term='LWUIT J2ME JavaME Chinese'/><category term='LWUIT J2ME JavaME OpenSource'/><category term='LWUIT J2MELWUIT J2ME JavaME Pimp Effect Scroll Fade'/><category term='LWUIT J2ME JavaME JavaFX Highest Common Denominator'/><category term='LWUIT J2ME JavaME PaderSync MyWidz Applications'/><category term='LWUIT J2ME JavaME Pimp Effect Round Fade'/><category term='LWUIT J2ME JavaME AJAX Mobile2.0'/><category term='LWUIT J2ME JavaME bidi'/><category term='LWUIT GUIBuilder ResourceEditor tutorial Timeline'/><category term='Designer LWUITDesigner ResourceEditor Musix apps android'/><category term='LWUIT J2ME JavaME Video HTC Touch Device'/><category term='LWUIT J2ME JavaME List'/><category term='LWUIT J2ME JavaME Physics Motion'/><category term='LWUIT J2ME JavaME Touch Speed Slide'/><category term='LWUIT J2ME JavaME Telmap GIS'/><category term='LWUIT J2ME JavaME TableLayout Table'/><category term='LWUIT J2ME JavaME SDN Video'/><category term='LWUIT J2ME JavaME Tutorial'/><category term='LWUIT J2ME JavaME Chart'/><category term='LWUIT GUIBuilder ResourceEditor tutorial'/><category term='LWUIT J2ME JavaME ComboBox Ticker Renderer'/><category term='LWUIT J2ME JavaME Focus Animation'/><category term='LWUIT J2ME JavaME JavaOne'/><category term='LWUIT PeerComponent VideoComponent MediaComponent'/><category term='LWUIT J2ME JavaME Pimp Effect Scroll'/><category term='LWUIT J2ME JavaME Glasspane Painter'/><category term='LWUIT J2ME JavaME Image Yoga Swipe Transition'/><category term='LWUIT J2ME JavaME'/><category term='Designer LWUITDesigner ResourceEditor l10n i18n localization internationalization tutorial'/><category term='LWUIT J2ME JavaME YouTube ResourceEditor'/><category term='LWUIT J2ME JavaME YouTube Device Touch F480 Samsung'/><category term='LWUIT J2ME JavaME Chat Demo JavaOne Telmap bidi'/><category term='LWUIT J2ME JavaME TV'/><category term='Designer LWUITDesigner'/><category term='LWUIT J2ME JavaME JavaOne Pimp'/><category term='LWUIT J2ME JavaME Touch'/><category term='LWUIT J2ME JavaME Ginga TV CDC'/><category term='LWUIT J2ME JavaME Tabs TabbedPane'/><category term='LWUIT J2ME JavaME Animation Timeline'/><category term='LWUIT Mashups Web2.0 market'/><category term='LWUIT ContainerList'/><category term='LWUIT J2ME JavaME Video JavaOne'/><category term='LWUIT J2ME JavaME Pimp Effect Device'/><category term='LWUIT J2ME JavaME 1.3'/><category term='LWUIT J2ME JavaME Blackberry RIM Android'/><category term='LWUIT J2ME JavaME articles'/><category term='LWUIT J2ME JavaME Layout'/><category term='LWUIT J2ME JavaLWUIT J2ME JavaME Borders Painters Gradient Shadow'/><category term='LWUIT J2ME JavaME JAR Size Overhead'/><category term='LWUIT J2ME JavaME Speed Benchmark Performance'/><category term='LWUIT J2ME JavaME Makeover Samsung F480'/><category term='LWUIT J2ME JavaLWUIT J2ME JavaME ResourceEditor'/><category term='LWUIT J2ME JavaME Porting Android CDC SE'/><category term='LWUIT J2ME JavaME Memory RAM'/><category term='LWUIT J2ME JavaME CookBook'/><category term='LWUIT J2ME JavaME Press'/><category term='LWUIT J2ME JavaME SVG Makeover'/><title type='text'>This Blog Has Moved</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default?start-index=101&amp;max-results=100'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>247</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-6848012476812627916</id><published>2012-01-23T11:36:00.000-08:00</published><updated>2012-01-23T11:36:09.902-08:00</updated><title type='text'>Blog moved</title><content type='html'>This blog has moved to &lt;a href="http://codenameone.blogspot.com/"&gt;http://codenameone.blogspot.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-6848012476812627916?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/6848012476812627916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2012/01/blog-moved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6848012476812627916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6848012476812627916'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2012/01/blog-moved.html' title='Blog moved'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3920868989428112947</id><published>2012-01-23T06:07:00.000-08:00</published><updated>2012-02-03T11:47:31.949-08:00</updated><title type='text'>Delaying Beta Release (Please Blame Git Hub)</title><content type='html'>I just lost two days worth of work because of f'ing github, its merge system and UI tool is such an unholy mess that it created a branch long story short I lost 2 or maybe more days of work. (Hard to tell just how much).&lt;br /&gt;This will probably delay us further since now we need to find a new host for the open source and backend sources. I highly recommend you avoid github. They have a nice interface on the Mac but it just fails with weird error messages and on Windows git is a no show, tortoise GIT isn't even remotely in the league of SVN.&lt;br /&gt;&lt;br /&gt;Sorry, I won't post any Codename One related material this week. We are trying to get the beta out of the door and this came out in the absolute worse time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3920868989428112947?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3920868989428112947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2012/01/delaying-beta-release-please-blame-git.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3920868989428112947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3920868989428112947'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2012/01/delaying-beta-release-please-blame-git.html' title='Delaying Beta Release (Please Blame Git Hub)'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1085513862345096785</id><published>2012-01-13T01:00:00.000-08:00</published><updated>2012-02-03T11:47:31.774-08:00</updated><title type='text'>What Is Codename One</title><content type='html'>The signup for the private beta of Codename One is now complete, thank you all for the great response to this. You should receive an email within 24 hours regarding your signup status (assuming you signed up).&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Codename One is a cross device platform allowing you to write your code once in Java and have it work on all devices specifically: iPhone, Android, Blackberry, Windows Phone 7 &amp;amp; J2ME devices. The biggest goals for the project are ease of use/RAD (rapid application development), deep integration with the native platform &amp;amp; native speed.&lt;br /&gt;&lt;br /&gt;To achieve this we looked at the pain points and missing elements within the current environments and added/refined the elements we think are missing. We used the portability experience of LWUIT to effectively reinvent Java programming for mobile devices and still allow full access to the underlying OS including embedding native components in place.&lt;br /&gt;&lt;br /&gt;The Codename One solution consists of the following parts:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Codename One API - a Swing like API geared for mobile devices with support for IO, GPS, Media/Camera etc. The UI/IO portions of the Codename One API are based on LWUIT which is highly optimized to mobile device development, multi-resolution and multi-DPI programming.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Native Themes - Codename One ships with native device themes that are implicitly set to a project to ease the integration with the native OS.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;NetBeans/Eclipse plugins - for the beta period we will focus mostly on NetBeans support but the intention is to provide a choice of IDE's. The plugin allows easy development without requiring any additional installations of device emulators or platforms.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Simulator environment - Codename One provides a FAST, easy to use and flexible simulator environment to simulate common devices on the market. This environment is highly pluggable and extensible allowing the community to quickly pick it up.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Codename One Designer - GUI builder, theme creator, localization tool and generally the Swiss army knife of Codename. It allows drag and drop application creation as well as unique features such as live preview of the GUI on an actual device.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Build Server - its remarkably hard to get a device build working on one platform and getting it working on 6 (RIM is effectively 2 or even 3 platforms) is one of the hardest things in device programming. Codename One offers a cloud service to seamlessly build your applications for free. You can always compile them locally and avoid the cloud service entirely, that is pretty difficult to accomplish in comparison it also requires a Mac for iPhone builds and Windows for RIM/Windows Phone 7 builds.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Cloud services - Codename One offers cloud services ranging from crash protection to on device debugging and access to web services, push notification, location etc.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I'm hoping you have lots of questions and feedback to give so please provide it in the comments section bellow. I will try to update the &lt;a href="http://www.codenameone.com/faq.html"&gt;FAQ&lt;/a&gt; with answers&amp;nbsp; to all the questions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1085513862345096785?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1085513862345096785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2012/01/what-is-codename-one.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1085513862345096785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1085513862345096785'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2012/01/what-is-codename-one.html' title='What Is Codename One'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3462948039204741134</id><published>2012-01-07T23:28:00.000-08:00</published><updated>2012-02-03T11:47:31.795-08:00</updated><title type='text'>Simulate It</title><content type='html'>&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/DI4MsVQdcr4" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br/&gt;One of the things I really don't like about mobile development is the simulators. For those of you who might not know it, I was a member of the WTK (Sun Wireless Toolkit) 1.0 team and Chen was the lead for the Sprint WTK. So we have lots of experience in building device simulators and working with Simulators/emulators.&lt;br /&gt;&lt;br /&gt;Despite our best efforts the experience of working with a simulator sucks there are better and worse simulators but the fact still remains that you can't provide the same tooling/ease of use that you get when developing "proper" Java SE&amp;nbsp; code.&lt;br /&gt;&lt;br /&gt;As part of Codename One we intend to revolutionize simulators by providing the worlds simplest simulator, it supports proper device scaling (where the fonts are scaled separately to keep them readable) which allows developing on smaller screen sizes. Its wicked fast, highly pluggable, customizable and most importantly completely open source.&lt;br /&gt;&lt;br /&gt;Check out the quick demo above and notice how the simulator adapts to different devices resolutions/scaling. I didn't show off some of the nicer things such as its ability to assume native device themes since the tzone demo enforces its own theme.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3462948039204741134?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3462948039204741134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2012/01/simulate-it.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3462948039204741134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3462948039204741134'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2012/01/simulate-it.html' title='Simulate It'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/DI4MsVQdcr4/default.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2374760661493663909</id><published>2012-01-03T01:53:00.000-08:00</published><updated>2012-02-03T11:47:31.787-08:00</updated><title type='text'>Live Preview On Device And Beta Signup</title><content type='html'>&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/pssvMU1-fGs" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;The video above shows the upcoming live preview resource editor feature that will be landing together with everything that's coming. This feature essentially allows you to edit a theme/GUI within the resource editor and the devices are updated &lt;b&gt;INSTANTLY&lt;/b&gt; with the changes. This is a huge boon for designers who often need to feel the final result on the device.&lt;br /&gt;&lt;br /&gt;Within a couple of weeks we will make the full announcement regarding the upcoming roadmap and exactly where we are headed...&lt;br /&gt;&lt;br /&gt;You can start signing up for the private beta cycles by going &lt;a href="http://www.codenameone.com/products.html"&gt;here&lt;/a&gt;, please don't be offended if you don't get picked for the first beta cycles since we are trying to keep them small to iron out the kinks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2374760661493663909?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2374760661493663909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2012/01/live-preview-on-device-and-beta-signup.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2374760661493663909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2374760661493663909'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2012/01/live-preview-on-device-and-beta-signup.html' title='Live Preview On Device And Beta Signup'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/pssvMU1-fGs/default.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-35451841833323107</id><published>2011-12-26T10:10:00.000-08:00</published><updated>2012-02-03T11:47:31.932-08:00</updated><title type='text'>One Code. All Devices. No Compromises!</title><content type='html'>&lt;iframe width="480" height="360" src="http://www.youtube.com/embed/0qvcZOIWSF4" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;Wouldn't it be great if you could write your code once and actually have it work on all the devices out there?&lt;br /&gt;Wouldn't it be great if you could develop to iPhone/iPad without a Mac?&lt;br /&gt;Wouldn't it be great if you could develop to Windows Phone 7 without a Windows 7 PC?&lt;br /&gt;Wouldn't it be great if the simulators started instantly and were fast so you don't have to wait for them? &lt;br /&gt;Wouldn't it be great if the simulators allowed you the full richness of the Java debuggers and QA tools?&lt;br /&gt;Wouldn't it be great if the you had a single visual development environment that "just worked"?&amp;nbsp; &lt;br /&gt;Wouldn't it be great if that environment would just preview all your changes instantly onto devices?&lt;br /&gt;Wouldn't it be great if you could do wireless on device debugging?&amp;nbsp; &lt;br /&gt;Wouldn't it be great if application crashes would just send you the stack trace information and user feedback?&lt;br /&gt;Wouldn't it be great if you could just give a design tool to your designer to work with and then just bind the code afterwards?&lt;br /&gt;&lt;br /&gt;So many great things are coming, too much to mention.&lt;br /&gt;&lt;br /&gt;Sorry for being a tease ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-35451841833323107?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/35451841833323107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/12/one-code-all-devices-no-compromises.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/35451841833323107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/35451841833323107'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/12/one-code-all-devices-no-compromises.html' title='One Code. All Devices. No Compromises!'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/0qvcZOIWSF4/default.jpg' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-6675410424353890022</id><published>2011-12-19T21:04:00.000-08:00</published><updated>2012-02-03T11:47:31.974-08:00</updated><title type='text'>Coming Soon</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-WlSHjt6GgHU/TvAXMGN8eyI/AAAAAAAALAw/EmJ6X9Kqql4/s1600/Screen+Shot+2011-12-20+at+07.02.33.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-WlSHjt6GgHU/TvAXMGN8eyI/AAAAAAAALAw/EmJ6X9Kqql4/s320/Screen+Shot+2011-12-20+at+07.02.33.png" width="171" /&gt;&lt;/a&gt;&lt;/div&gt;I will provide more details as I can divulge in January. Keep watching this space.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-6675410424353890022?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/6675410424353890022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/12/coming-soon.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6675410424353890022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6675410424353890022'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/12/coming-soon.html' title='Coming Soon'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-WlSHjt6GgHU/TvAXMGN8eyI/AAAAAAAALAw/EmJ6X9Kqql4/s72-c/Screen+Shot+2011-12-20+at+07.02.33.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3571171156181814642</id><published>2011-12-12T06:17:00.000-08:00</published><updated>2012-02-03T11:47:31.944-08:00</updated><title type='text'>I Suck At Photoshop</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-MocSaOm1UdA/TuFCxEMJ2ZI/AAAAAAAADrI/bn52QmnLk1A/s1600/square.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-MocSaOm1UdA/TuFCxEMJ2ZI/AAAAAAAADrI/bn52QmnLk1A/s320/square.jpg" width="179" /&gt;&lt;/a&gt;&lt;/div&gt;I was looking at the presentation from &lt;a href="http://mobile.dzone.com/articles/video-taming-android-uis-eric?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+javalobby%2Ffrontpage+%28Javalobby+%2F+Java+Zone%29"&gt;Eric Burke&lt;/a&gt; about the work square did with Android which resulted in a really nice UI. He tells about quite a few struggles they had with the Android API which seem to be pretty easy to get around in LWUIT.&lt;br /&gt;Anyway, one of the nicest things they did was the screenshot on the right which features a leather texture with stitches as the UI for the application which is a really nice touch for a wallet application (assuming you aren't a vegan).&lt;br /&gt;Anyway, that took me back a bit... How do you make a UI like that regardless of the platform that will look nice for all resolutions. I came up with the answer but because I suck at Photoshop I wasn't able to achieve anything remotely close to the image on the right... This just goes to show you how valuable professional design can be to a team.&lt;br /&gt;The way to produce an image like that is start with a clean tileable leather texture such as this one which I got from &lt;a href="http://webtreats.mysitemyway.com/free-tileable-leather-patterns/"&gt;here&lt;/a&gt; and scaled down:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-mmR2kC-7s24/TuYKkscGRoI/AAAAAAAAK_8/tmoOQ-UT0aQ/s1600/leather.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-mmR2kC-7s24/TuYKkscGRoI/AAAAAAAAK_8/tmoOQ-UT0aQ/s1600/leather.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I set this as the style of the Form UIID and made it TILE on both axis's.&amp;nbsp; Then I created a simple transparent gradient image, its so transparent you might not even see it but its very important to create the texturized depth to the image above:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-WF8b4iXqa5g/TuYK6aO0wWI/AAAAAAAALAE/-T7WdWeqB4I/s1600/blend.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-WF8b4iXqa5g/TuYK6aO0wWI/AAAAAAAALAE/-T7WdWeqB4I/s320/blend.png" width="213" /&gt;&lt;/a&gt;&lt;/div&gt;I created a container and placed it above the form and gave it a style of Gradient, then I set this image as the scaled background (since this is an alpha mask scaling won't hurt the image quality much).&lt;br /&gt;Last I created a stitch image by using a stitch brush tool I found on the internet and this is the stitch image I was able to make (I set the background to red since the image is barely visible otherwise):&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-2lkNfwLu3PE/TuYLX9hAySI/AAAAAAAALAM/pO9sXbjalFw/s1600/stitch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-2lkNfwLu3PE/TuYLX9hAySI/AAAAAAAALAM/pO9sXbjalFw/s1600/stitch.png" style="background-color: red;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I set the stitches as a 9-piece border which allowed them to grow nicely. However, due to the bad source material the end result doesn't look nearly as polished as the work the guys from square were able to achieve. I'm guessing they have a depression overlay with the stitch layer to create an additional effect and their images are obviously more refined. This is what I ended up with in the resource editor:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-LdiEdxXlJJI/TuYM-5YcHmI/AAAAAAAALAU/KUn25XTlzmQ/s1600/Screen+Shot+2011-12-12+at+16.17.01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-LdiEdxXlJJI/TuYM-5YcHmI/AAAAAAAALAU/KUn25XTlzmQ/s320/Screen+Shot+2011-12-12+at+16.17.01.png" width="212" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3571171156181814642?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3571171156181814642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/12/i-suck-at-photoshop.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3571171156181814642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3571171156181814642'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/12/i-suck-at-photoshop.html' title='I Suck At Photoshop'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-MocSaOm1UdA/TuFCxEMJ2ZI/AAAAAAAADrI/bn52QmnLk1A/s72-c/square.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1754930637958223834</id><published>2011-12-04T23:55:00.000-08:00</published><updated>2012-02-03T11:47:31.780-08:00</updated><title type='text'>Using EmbeddedContainer</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="360" src="http://www.youtube.com/embed/F8utkzc-4OU" width="640"&gt;&lt;/iframe&gt;EmbeddedContainer is a class I added to LWUIT 1.5 without much fanfare out of a simple necessity, the problem is that this necessity existed only within the GUI builder and the class makes no sense outside of the context of the GUI builder. How do you document something like that???&lt;br /&gt;The necessity came about due to Triplay's application designs (our original GUI builder beta site), their design was iPhone inspired and so it relied on tabs (iPhone style tabs at the bottom of the screen) where different features of the application are within a different tab.&lt;br /&gt;&lt;br /&gt;This didn't mesh well with the LWUIT GUI builder navigation logic and so we needed to rethink some of it. I wanted to reuse GUI as much as possible while still enjoying the advantage of navigation being completely managed for me.&lt;br /&gt;Android does this with Activities and the iPhone itself has a view controller, I don't like both approaches and think they both suck. The problem is that you have what is effectively two incompatible hierarchies to mix and match which is why Android needed to "invent" fragments and Apple can't mix view controllers within a single application.&lt;br /&gt;&lt;br /&gt;The Component/Container hierarchy is powerful enough to represent such a UI but we needed a "marker" to indicate to the UIBuilder where a "root" component exists so navigation occurs only within the given "root". Here EmbeddedContainer comes into play, its a simple container that can only contain another GUI from the GUI builder. Nothing else. So we can place it in any form of UI and effectively have the UI change appropriately and navigation would default to "sensible values".&lt;br /&gt;&lt;br /&gt;Navigation replaces the content of the embedded container, it finds the embedded container based on the component that broadcast the event. If you want to navigate manually just use the showContainer() method which accepts a component, you can give any component that is under the EmbeddedContainer you want to replace and LWUIT will be smart enough to replace only that component.&lt;br /&gt;&lt;br /&gt;You can see an example of building a simple Tab based UI with the GUI builder and embedded container in the video above. The nice part about this is that this UI can be very easily refactored to provide a more traditional form based UI without duplicating effort and can be easily adapted to a more tablet oriented UI (with a side bar) again without much effort.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1754930637958223834?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1754930637958223834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/12/using-embeddedcontainer.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1754930637958223834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1754930637958223834'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/12/using-embeddedcontainer.html' title='Using EmbeddedContainer'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/F8utkzc-4OU/default.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5407522174556372955</id><published>2011-11-30T00:46:00.000-08:00</published><updated>2012-02-03T11:47:31.953-08:00</updated><title type='text'>Interview With Peter &amp; Ofir From JavaOne</title><content type='html'>When we were at JavaOne this year Ofir and Peter sat down for a chat about the &lt;a href="http://www.aegis-project.eu/index.php?option=com_content&amp;amp;view=article&amp;amp;id=155&amp;amp;Itemid=25"&gt;LWUIT accessibility&lt;/a&gt;, which&amp;nbsp; you can read about there. Its a fascinating and complex subjects that we don't spend much time thinking about.&lt;br /&gt;Listen to their interview in the Java Spotlight &lt;a href="http://blogs.oracle.com/javaspotlight/entry/java_spotlight_episode_58_peter"&gt;mobility podcast&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5407522174556372955?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5407522174556372955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/11/interview-with-peter-ofir-from-javaone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5407522174556372955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5407522174556372955'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/11/interview-with-peter-ofir-from-javaone.html' title='Interview With Peter &amp;amp; Ofir From JavaOne'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-7921805227907727321</id><published>2011-11-27T23:54:00.000-08:00</published><updated>2012-02-03T11:47:31.981-08:00</updated><title type='text'>How LWUIT Is Different (better) From Swing</title><content type='html'>I've been meaning to write an introduction to LWUIT for Swing developers, for quite a while so this is it. We were highly inspired by Swing when writing LWUIT and that inspiration allows Swing developers instant familiarity into LWUIT thus providing them a very easy path into mobile development without the hassle.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;The best way for a Swing developer to get into mobile is just to open a LWUIT based project and start working, its just that simple! At first the use of styles might seem slightly alien but you get used to it instantly and its ridiculously familiar. &lt;br /&gt;&lt;br /&gt;There are quite a few differences between LWUIT and Swing which came thanks to the fact that we could learn and adapt from Swing. So LWUIT is in effect better than Swing mostly thanks to it being newer. Here is a list of highlight/bullet points for Swing developers wishing to take a look at LWUIT.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What's Similar:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Component/Container hierarchy with layout managers to arrange the elements. All the old friends are there with some additional added features (GridLayout, BorderLayout, BoxLayout, FlowLayout, GroupLayout) and some new (TableLayout, LayeredLayout). Naturally LWUIT doesn't feature the whole JComponent sub hierarchy and maintains a simpler hierarchy.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You can override paint and get a graphics object to do whatever you want. LWUIT is lightweight (just like Swing) and draws everything on its own to maximize portability and flexibility&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You can add/remove action listener and similar observer based patterns for various events&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Dialogs can be modal, so when you use Dialog.show() or similar method the next line won't execute until the dialog is disposed. Like in Swing, this is entirely optional.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;LWUIT has a glasspane, its a bit different from the Swing glasspane but very similar in functionality&lt;br /&gt;&lt;/li&gt;&lt;li&gt;List model and list cell renderer, pretty much like Swing's API with added functionality for animations and horizontal lists. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;ContentPane for the body of the Form (LWUIT's root component) which is technically hidden&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The LWUIT EDT requires that you interact with it over a single thread, it has a callSerially method (invokeLater), callSeriallyAndWait (invokeAndWait) and even an invokeAndBlock (foxtrot for the advanced swing users)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What's Different :&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Optimized for phones/tablets both touch &amp;amp; feature phones. This includes support for gestures and complex key layouts&lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;Styles &amp;amp; Themeing - the PLAF is much narrower in LWUIT (due to size constraints) but LWUIT makes up for it by having a Style object associated with every component. Furthermore, LWUIT allows customizing said styles with a theme that can be created visually using an open source resource editor tool!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Animations are integrated in the core of LWUIT in several levels. You can animate layouts, transitions and just arbitrary objects.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The resource file format is an integral part of LWUIT (although technically completely optional) it offers a GUI builders (optional but quite helpful), theme creator, localization etc. Unlike matisse it doesn't generate any code thus providing a more VB like experience where the UI and code are cleanly separated. The tool can be given to a designer with no coding experience&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Painters - Swing tried to integrate painters after the fact and failed since the framework needs to be designed with them to begin with. We did just that. We also separated background painting from foreground painting and made it easier to override just background painting.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Deep and elaborate porting layer allowing LWUIT to be ported to any platform easily &lt;br /&gt;&lt;/li&gt;&lt;li&gt;LWUIT is &lt;b&gt;truly&lt;/b&gt; open source - while Swing was technically open sourced, debugging/modifying Swing was not trivial since it was integrated into the JDK. This also prevented developers from incorporating fixes (or a known working version) into their build. &lt;br /&gt;LWUIT is bundled with the application so you can easily fix it and very easily modify code/debug to locate/fix issues. The development is easy to follow with a public viewable SVN. You can actually get commits from us as we fix issues and add features.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-7921805227907727321?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/7921805227907727321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/11/how-lwuit-is-different-better-from.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7921805227907727321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7921805227907727321'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/11/how-lwuit-is-different-better-from.html' title='How LWUIT Is Different (better) From Swing'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5903913532210257235</id><published>2011-11-21T04:38:00.000-08:00</published><updated>2012-02-03T11:47:31.966-08:00</updated><title type='text'>Places Demo Part V: Location Animation</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="360" src="http://www.youtube.com/embed/N4Joaz-TniE" width="640"&gt;&lt;/iframe&gt;Simple animations to provide a sense of place/navigation are what makes an application shine. They attract the attention of the user to the ongoing operation within the application while providing a sense of continuity, in that sense they are not "fluff" and should be taken very seriously.&lt;br /&gt;One of the nicest things in the places demo is the animation on the map bellow which you should be able to see in the video above. When selecting a city within the demo we can see an animation of the map highlight moving to a new location. To do that we need to start with the map location image here (I set the text background to red to make the white image visible):&lt;br /&gt;&lt;div class="separator" style="background-color: red; clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-85cJHaJDf80/TspHKZMjrxI/AAAAAAAAK-4/T2_iMXBd1qU/s1600/mapLocation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-85cJHaJDf80/TspHKZMjrxI/AAAAAAAAK-4/T2_iMXBd1qU/s1600/mapLocation.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="background-color: red;"&gt;&lt;br /&gt;&lt;/div&gt;We can add this image by using the add multi-image dialog as such:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-K4YQ8-eApdw/TspHo3XrQiI/AAAAAAAAK_A/jVP-LKIret8/s1600/Screen+Shot+2011-11-21+at+13.56.37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://4.bp.blogspot.com/-K4YQ8-eApdw/TspHo3XrQiI/AAAAAAAAK_A/jVP-LKIret8/s320/Screen+Shot+2011-11-21+at+13.56.37.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And now we need to go back to the GUI builder to place the image on the map, don't worry about the location we will get to that soon enough. I select the Map Label entry and change its name to Map (to make it easier to work with it in code), I also change the name of the List at the bottom to cityList.&lt;br /&gt;Next drag a container into the same container where the Map is currently at and set its layout to layered layout. Make sure that the Map entry is before the Container entry which you just added (you can rearrange them in the tree). Drag the Map into that container and place another new container next to it. Drag a label into the new container and call it "MapHighlight", set its text to an empty string, set its UIID to container and select the mapPosition.png image as its icon. You should end up with something that looks like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-QKyA5Acg1Dk/TspJSh1D9MI/AAAAAAAAK_I/UIAWAO2pCS8/s1600/Screen+Shot+2011-11-21+at+14.50.54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="216" src="http://2.bp.blogspot.com/-QKyA5Acg1Dk/TspJSh1D9MI/AAAAAAAAK_I/UIAWAO2pCS8/s320/Screen+Shot+2011-11-21+at+14.50.54.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now its &lt;u&gt;&lt;b&gt;FINALLY&lt;/b&gt;&lt;/u&gt; time to start writing some code... Click the menu Application-&amp;gt;Generate Netbeans Project. Type the name "LWUITPlaces" and select a directory into which the project should be generated.&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Important:&lt;/b&gt; you do this only ONCE after that saving the file will automatically update the generated code for you. &lt;b&gt;Also important&lt;/b&gt;: If you saved the file in the past the old location is no longer relevant! The resource file will now be within the src directory of the generated project and can't be moved from that location.&lt;br /&gt;&lt;br /&gt;In the GUI select the Form and select the events tab in the properties on the right, click the "Before Show" button. This should open the StateMachine.java file in Netbeans and create a method like this:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void beforeMain(Form f) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.beforeMain(f);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;Before we continue go to the top of the class and add the following variables and constants:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static final int MAP_ORIGINAL_WIDTH = 178;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static final int MAP_ORIGINAL_HEIGHT = 114;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int mapActualWidth;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int mapActualHeight;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static final int [][] MAP_POINTS =&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {10, 65},&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {0, 42},&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {77, 75},&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {146, 37},&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {107, 33}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int mapSelection = 0;&lt;br /&gt;&lt;br /&gt;We will also need these methods to exist:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int mapXCoordinate(int c) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (int)(((float)c) / ((float)MAP_ORIGINAL_WIDTH) * ((float)mapActualWidth));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int mapYCoordinate(int c) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (int)(((float)c) / ((float)MAP_ORIGINAL_HEIGHT) * ((float)mapActualHeight));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;Some of these things might seem obvious but others might not. When we animate to a particular list offset we need to know the pixel coordinate of the city within the Map. This worked great in Martin &amp;amp; Chen's demo since they used a regular image as the map. The problem is that a regular sized image would not work for lower/higher resolution devices which is why I used a multi-image.&lt;br /&gt;Once I used a multi-image the resolution of the image (hence the coordinates) would change depending on the device, so all the old city coordinates from Martin will no longr work (these are the MAP_POINTS coordinates).&lt;br /&gt;&lt;br /&gt;The trick is simple, I ask the size of the map image in runtime and store it within the mapActualWidth/Height variables. Then I calculate the position in map offsets using a simple ratio equasion in the mapXCoordinate/mapYCoordinate methods.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Back to the beforeMain method (under the super call) we will write the code to position the selection based on coordinates. With the comments within the body I hope the content of this method is clear enough:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/c80bf70350a11acab15d.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5903913532210257235?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5903913532210257235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-v-location-animation.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5903913532210257235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5903913532210257235'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-v-location-animation.html' title='Places Demo Part V: Location Animation'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/N4Joaz-TniE/default.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5579763063865399454</id><published>2011-11-14T07:15:00.000-08:00</published><updated>2012-02-03T11:47:31.959-08:00</updated><title type='text'>Places Demo Part IV</title><content type='html'>Last time we left off with the UI partially implemented yet we left one of the hardest features still ahead: the annoying circular button.&lt;br /&gt;To implement that button we will first select the top area container (the one with the MainList UIID) and set its layout to box layout Y. We will then drag a container (which will represent the first entry in the list) into that container, we will set the layout of that container to LayeredLayout!&lt;br /&gt;We will then place two containers within the layered layout container and set both to BorderLayout. We will add a button to the center of the first (label it Attractions) and a label to the west of the second (give it a " " space label, important do not leave it blank make sure a space is there!).&lt;br /&gt;&lt;br /&gt;One last thing I forgot the last time, update the padding of the MainList UIID to 10 on all sides to keep the entries at a healthy distance from the border. &lt;br /&gt;&lt;br /&gt;You should end up with something like the image bellow:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-6kIRN_VA_Oo/TsD4NdAOxtI/AAAAAAAAK7U/2HeyOzSO8KE/s1600/Screen+Shot+2011-11-14+at+13.13.49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://4.bp.blogspot.com/-6kIRN_VA_Oo/TsD4NdAOxtI/AAAAAAAAK7U/2HeyOzSO8KE/s320/Screen+Shot+2011-11-14+at+13.13.49.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What we did is create a layered layout which places one component on top of the other and we used two containers with their layout to position a label on top of a button pretty much like we would do for the actual layout of the button.&lt;br /&gt;&lt;br /&gt;Now lets style this to actually look like the end result, change the UIID of the attractions button to ListEntry and open its unselected style. Use this image to create an image border (notice I placed the same image in my first post in this series but it had a small artifact on it so use this one!):&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-r2jfsWDOJxc/TsD8fvW_GeI/AAAAAAAAK7c/90GnvtKxGgU/s1600/list_entry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-r2jfsWDOJxc/TsD8fvW_GeI/AAAAAAAAK7c/90GnvtKxGgU/s1600/list_entry.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And define the image border as such:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-S_jLdF8qhpE/TsD86M4qPrI/AAAAAAAAK7k/pvZ5krD9DhA/s1600/Screen+Shot+2011-11-14+at+11.37.26.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://4.bp.blogspot.com/-S_jLdF8qhpE/TsD86M4qPrI/AAAAAAAAK7k/pvZ5krD9DhA/s320/Screen+Shot+2011-11-14+at+11.37.26.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After generating the image border select the Margin and define 5 &lt;b&gt;Millimeters&lt;/b&gt; on the left side and 1 millimeter on every other side. Notice that using millimeters allows us to scale the padding/margin more appropriately to higher/lower resolutions.&lt;br /&gt;Then select the padding tab and define 5 &lt;b&gt;Millimeters&lt;/b&gt; on the left and 15 pixels on the other sides.&lt;br /&gt;After pressing OK you should have something like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-idJU-uwVRkk/TsD-Kt1a9dI/AAAAAAAAK7s/_GP-kW3T4fw/s1600/Screen+Shot+2011-11-14+at+13.39.58.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="177" src="http://4.bp.blogspot.com/-idJU-uwVRkk/TsD-Kt1a9dI/AAAAAAAAK7s/_GP-kW3T4fw/s320/Screen+Shot+2011-11-14+at+13.39.58.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now select the parent container of the button and set its style to PaddedContainer, set the padding to 10 pixels on the left 0 on the right 4 on top and 4 on bottom. In the derive tab select deriving from Container. This will ensure that the button will always be smaller than the label which is important for the base design.&lt;br /&gt;&lt;br /&gt;Now add the following images as multi-images:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-enUXU5IcU7U/TsD_PVpsVvI/AAAAAAAAK70/V1sHaGSzV_k/s1600/attractions.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-enUXU5IcU7U/TsD_PVpsVvI/AAAAAAAAK70/V1sHaGSzV_k/s1600/attractions.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-m_eh7pmKYvk/TsD_PjRUY8I/AAAAAAAAK74/uSYerQ37pPI/s1600/bars.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-m_eh7pmKYvk/TsD_PjRUY8I/AAAAAAAAK74/uSYerQ37pPI/s1600/bars.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-QN1e8VHYRQs/TsD_Qe4hIaI/AAAAAAAAK8E/7CtjJMqoIJE/s1600/bed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-QN1e8VHYRQs/TsD_Qe4hIaI/AAAAAAAAK8E/7CtjJMqoIJE/s1600/bed.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-8cBj9Q5JUrs/TsD_Q53-cVI/AAAAAAAAK8I/7WUx4cBECrY/s1600/places_icon.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-8cBj9Q5JUrs/TsD_Q53-cVI/AAAAAAAAK8I/7WUx4cBECrY/s1600/places_icon.png" /&gt;&lt;/a&gt;&lt;/div&gt;Using the "Add Multi-Images" add these 4 icons as such:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-c99jNp-ojxU/TsEBfo-IWUI/AAAAAAAAK8U/U7v7IMcrRic/s1600/Screen+Shot+2011-11-14+at+11.53.39.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="271" src="http://4.bp.blogspot.com/-c99jNp-ojxU/TsEBfo-IWUI/AAAAAAAAK8U/U7v7IMcrRic/s320/Screen+Shot+2011-11-14+at+11.53.39.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Open ListEntry's selected/pressed style and in the derive tab type "ListEntry" unselected to derive the same style.&lt;br /&gt;&lt;br /&gt;Select the label for the first entry and set its UIID to AttractionsIcon, edit its style and set the background to image scaled and attractions.png image from above:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-enUXU5IcU7U/TsD_PVpsVvI/AAAAAAAAK70/V1sHaGSzV_k/s1600/attractions.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-enUXU5IcU7U/TsD_PVpsVvI/AAAAAAAAK70/V1sHaGSzV_k/s1600/attractions.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Set the padding of the style to 5 millimeters on all sides and the margin to 0 on all sides.&lt;br /&gt;&lt;br /&gt;You should end up with this result:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-CuhwrIzCl3I/TsERt8MzVSI/AAAAAAAAK8c/SFGLz5IdakA/s1600/Screen+Shot+2011-11-14+at+15.03.29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="162" src="http://1.bp.blogspot.com/-CuhwrIzCl3I/TsERt8MzVSI/AAAAAAAAK8c/SFGLz5IdakA/s320/Screen+Shot+2011-11-14+at+15.03.29.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Which is already pretty much what we are looking for. Now just right click on the attractionsContainer and copy it. Paste it to the parent container 4 times and update every entries icon/text to this end result:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-QPIE4GFVhw0/TsETVhdPEdI/AAAAAAAAK8k/pMTsBWrF5mE/s1600/Screen+Shot+2011-11-14+at+15.09.18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="294" src="http://2.bp.blogspot.com/-QPIE4GFVhw0/TsETVhdPEdI/AAAAAAAAK8k/pMTsBWrF5mE/s320/Screen+Shot+2011-11-14+at+15.09.18.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now just so you will understand why we did all of this, this is how the UI will look on the iPhone scale resolution (3GS = 320x480):&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-vCHjY6Cnx0Y/TsEVsXLd3cI/AAAAAAAAK8s/aPzh08QZKng/s1600/Screen+Shot+2011-11-14+at+15.13.23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-vCHjY6Cnx0Y/TsEVsXLd3cI/AAAAAAAAK8s/aPzh08QZKng/s320/Screen+Shot+2011-11-14+at+15.13.23.png" width="212" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Here is what it will look like on a Nexus One device (480x800, larger font):&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-TgIkEcA7nQ8/TsEWRmCdruI/AAAAAAAAK80/KtbV8ZfFF1A/s1600/Screen+Shot+2011-11-14+at+15.14.53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-TgIkEcA7nQ8/TsEWRmCdruI/AAAAAAAAK80/KtbV8ZfFF1A/s320/Screen+Shot+2011-11-14+at+15.14.53.png" width="199" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Notice that after blogger scaled down the images they look almost identical, but if you will click to zoom you will see they are sized very differently.&lt;br /&gt;&lt;br /&gt;Lets proceed with the easy parts! &lt;br /&gt;Select the main form and uncheck the scrollable Y property. Then select the Container with the MainList style and check its scrollable Y property. This will effectively make sure that horizontal scrolling doesn't hide the bottom section of the screen.&lt;br /&gt;&lt;br /&gt;Now lets add the entries in the list, select "Add Multi-Images" and select the following images:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-8eKudAg8vcs/TsEZYDnFHPI/AAAAAAAAK88/h0P__PYjIs4/s1600/chicago.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-8eKudAg8vcs/TsEZYDnFHPI/AAAAAAAAK88/h0P__PYjIs4/s1600/chicago.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-kuVegwdOTe4/TsEZYazjkpI/AAAAAAAAK9A/tx-3OaObFr8/s1600/dallas.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-kuVegwdOTe4/TsEZYazjkpI/AAAAAAAAK9A/tx-3OaObFr8/s1600/dallas.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UCjwkGp15cA/TsEZY4MYrjI/AAAAAAAAK9M/QeS1keSxicg/s1600/newYork.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-UCjwkGp15cA/TsEZY4MYrjI/AAAAAAAAK9M/QeS1keSxicg/s1600/newYork.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-PRZeG02ZSzE/TsEZZ_XQHII/AAAAAAAAK9U/h970j97U9II/s1600/sanDiego.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-PRZeG02ZSzE/TsEZZ_XQHII/AAAAAAAAK9U/h970j97U9II/s1600/sanDiego.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-95rzDGQt9pY/TsEZaPJ1etI/AAAAAAAAK9Y/ZB3qLDwS6bE/s1600/sanFrancisco.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-95rzDGQt9pY/TsEZaPJ1etI/AAAAAAAAK9Y/ZB3qLDwS6bE/s1600/sanFrancisco.png" /&gt;&lt;/a&gt;&lt;/div&gt;Use these values for the multi-image dialog:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-w7iJE1F9QbI/TsEcSkw6AFI/AAAAAAAAK9k/fwWj3gDA1ZQ/s1600/Screen+Shot+2011-11-14+at+15.32.09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="269" src="http://4.bp.blogspot.com/-w7iJE1F9QbI/TsEcSkw6AFI/AAAAAAAAK9k/fwWj3gDA1ZQ/s320/Screen+Shot+2011-11-14+at+15.32.09.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now select the UI section in the GUI builder and click the +  button on the top left to add a new Blank Container. Call it  CityRenderer.&lt;br /&gt;Set its UIID to "Renderer" and edit the style, set its derive tab to derive from Container and set its margin left/right to 15 millimeters.&lt;br /&gt;&lt;br /&gt;Set the layout of the container to border layout and place two labels one in the north which you should name "Icon" (notice this should be the name not the label text!) and another in the south which you should name "Name" (yep).&lt;br /&gt;Set the UIID of the North label to Container and the UIID of the south label to WhiteLabel. Edit the style of white label, set its foreground color to white and make its transparency 0. Set its alignment to Center.&lt;br /&gt;&lt;br /&gt;In the theme add a new Style in the selected tab called RendererFocus and set it to derive from Container.&lt;br /&gt;&lt;br /&gt;You should end up with something like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-SbqSaeVW2W8/TsEk8ynncNI/AAAAAAAAK9s/FfkNn2XSnjQ/s1600/Screen+Shot+2011-11-14+at+15.41.24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="116" src="http://4.bp.blogspot.com/-SbqSaeVW2W8/TsEk8ynncNI/AAAAAAAAK9s/FfkNn2XSnjQ/s320/Screen+Shot+2011-11-14+at+15.41.24.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Go back to the Main form in the UI builder and select the list of cities at the bottom, select the ListItems property and remove all the elements within it. Click add entry and add elements one by one starting with San Francisco (and the matching image from above) using the key Name for the city label and the key Icon for the image to this end result:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-gf7fw54FgFc/TsEpi9R9W_I/AAAAAAAAK90/A64wXxEvFqU/s1600/Screen+Shot+2011-11-14+at+16.45.22.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://1.bp.blogspot.com/-gf7fw54FgFc/TsEpi9R9W_I/AAAAAAAAK90/A64wXxEvFqU/s320/Screen+Shot+2011-11-14+at+16.45.22.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Follow this up and add all the cities from above to the list.&lt;br /&gt;After pressing OK select the list and set the fixed selection to Center and uncheck the scroll visible flag.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Last but not least select the Main form and type "LWUIT Places" in the title attribute, then create a title style and use this image to generate the border:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-vqjvnyE77Ps/TsEuzmpv6GI/AAAAAAAAK98/vL0vVK4BuwI/s1600/title.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="39" src="http://1.bp.blogspot.com/-vqjvnyE77Ps/TsEuzmpv6GI/AAAAAAAAK98/vL0vVK4BuwI/s320/title.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now use the border wizard as such:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UosdpXKNLKA/TsEu7apsRNI/AAAAAAAAK-E/vQt3CLAEQKI/s1600/Screen+Shot+2011-11-14+at+17.00.01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="195" src="http://2.bp.blogspot.com/-UosdpXKNLKA/TsEu7apsRNI/AAAAAAAAK-E/vQt3CLAEQKI/s320/Screen+Shot+2011-11-14+at+17.00.01.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And we are done! This is the final result:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-U43c-Ycpd00/TsEwoiVOVkI/AAAAAAAAK-M/6ZQmoTpbeZs/s1600/Screen+Shot+2011-11-14+at+17.15.35.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-U43c-Ycpd00/TsEwoiVOVkI/AAAAAAAAK-M/6ZQmoTpbeZs/s320/Screen+Shot+2011-11-14+at+17.15.35.png" width="211" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5579763063865399454?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5579763063865399454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-iv.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5579763063865399454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5579763063865399454'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-iv.html' title='Places Demo Part IV'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-6kIRN_VA_Oo/TsD4NdAOxtI/AAAAAAAAK7U/2HeyOzSO8KE/s72-c/Screen+Shot+2011-11-14+at+13.13.49.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-6445223973604637844</id><published>2011-11-07T03:42:00.000-08:00</published><updated>2012-02-03T11:47:31.969-08:00</updated><title type='text'>Places Demo Part III</title><content type='html'>OK, its time to get started with actual resource editor work. First we need to launch the resource editor and create a new blank theme.&lt;br /&gt;&lt;br /&gt;BTW If you follow along don't forget to save frequently, unfortunately the resource editor doesn't yet offer proper "crash recovery" it is in my todo list but is a rather hairy problem. &lt;br /&gt;&lt;br /&gt;Then I define the form background to a vertical gradient starting from d8fe:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-aHm492FjCB4/Tre3yJ3XjFI/AAAAAAAAK4E/daJejm0WMAQ/s1600/Screen+Shot+2011-11-07+at+12.48.32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="259" src="http://3.bp.blogspot.com/-aHm492FjCB4/Tre3yJ3XjFI/AAAAAAAAK4E/daJejm0WMAQ/s320/Screen+Shot+2011-11-07+at+12.48.32.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The next stage is going to the GUI builder and creating a new form (I called it Main, but call it whatever you want). I set its layout to border layout and placed two containers within it (in the center and in the south), these containers will hold the UI for the two portions of the screen.&lt;br /&gt;&lt;br /&gt;It should look something like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-DppVj1YHBKc/Tre5Al5DcoI/AAAAAAAAK4M/pKGWpaBJ84Y/s1600/Screen+Shot+2011-11-07+at+12.54.32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="163" src="http://2.bp.blogspot.com/-DppVj1YHBKc/Tre5Al5DcoI/AAAAAAAAK4M/pKGWpaBJ84Y/s320/Screen+Shot+2011-11-07+at+12.54.32.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then we need to allow for the design of the top area texture, for that we will add a new multi-image using the Images-&amp;gt;Add Multi-Images option and select the skyline image here:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-VDbL3A8RqR0/TrDbUJ6xo4I/AAAAAAAAK3M/Iv8nF_Y-uOE/s1600/skyline_texture_background.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-VDbL3A8RqR0/TrDbUJ6xo4I/AAAAAAAAK3M/Iv8nF_Y-uOE/s320/skyline_texture_background.png" width="269" /&gt;&lt;/a&gt;&lt;/div&gt;Notice that I am selecting the full size image and not the one included in the blog!&lt;br /&gt;&lt;br /&gt;Then I am prompted to select the resolutions to the multi images. Notice that I filled out the percentages (to 100 and 61) and only then updated the values to 0 where appropriate.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-LZ2tlrZ5s6s/Tre7IXLkaTI/AAAAAAAAK4U/_W2xGqOH0mw/s1600/Screen+Shot+2011-11-07+at+13.02.15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://1.bp.blogspot.com/-LZ2tlrZ5s6s/Tre7IXLkaTI/AAAAAAAAK4U/_W2xGqOH0mw/s320/Screen+Shot+2011-11-07+at+13.02.15.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This dialog effectively tells the resource editor which size images it should manufacture for every resolution. I selected 100% for width which means I want the typical width of a device class as listed above (since the image needs to occupy the full width) and selected 60 percent height to match the image dimensions.&lt;br /&gt;I zeroed out the values of the fields for which I didn't want an image created, very high resolution images would make my resource file too large and very low res images will be pointless for this sort of application.&lt;br /&gt;&lt;br /&gt;After pressing OK I select the first container and set its UIID property to "MainTexture", I then right click it and select Style-&amp;gt;Unselected to edit its style. I select "Image Tile Horizontal Align Top" and within the derive tab I type in Container (to inherit the behavior of the Container style).&lt;br /&gt;&lt;br /&gt;Notice that the image might not tile properly sometimes due to its size, in which case we can increase its width slightly. Ideally an image that tiles "properly" will provide the best background texture.&lt;br /&gt;&lt;br /&gt;You should have something that looks like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ekLjZy6wxCc/Tre82FWFH5I/AAAAAAAAK4c/i8vbWeylXGU/s1600/Screen+Shot+2011-11-07+at+13.10.46.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" src="http://2.bp.blogspot.com/-ekLjZy6wxCc/Tre82FWFH5I/AAAAAAAAK4c/i8vbWeylXGU/s320/Screen+Shot+2011-11-07+at+13.10.46.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And the GUI should look like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-wj8C251F59k/Tre9DfW8K-I/AAAAAAAAK4k/jdcenSwDgkI/s1600/Screen+Shot+2011-11-07+at+13.11.56.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="133" src="http://4.bp.blogspot.com/-wj8C251F59k/Tre9DfW8K-I/AAAAAAAAK4k/jdcenSwDgkI/s320/Screen+Shot+2011-11-07+at+13.11.56.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now we would like to add the carousel to the bottom of the screen and the map. &lt;br /&gt;We add the map image using the same multi-image approach from before:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-XHYkJVnoki8/Tre_aZrmifI/AAAAAAAAK40/Od8XISQkrBA/s1600/Screen+Shot+2011-11-07+at+13.14.21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="269" src="http://3.bp.blogspot.com/-XHYkJVnoki8/Tre_aZrmifI/AAAAAAAAK40/Od8XISQkrBA/s320/Screen+Shot+2011-11-07+at+13.14.21.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-XdiiD009Y2c/Tre_V0oLGTI/AAAAAAAAK4s/MG0rkEZbH9w/s1600/map.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-XdiiD009Y2c/Tre_V0oLGTI/AAAAAAAAK4s/MG0rkEZbH9w/s1600/map.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We then select the second container and select BoxLayout_Y as its layout. We drag two containers into it. We select the containers and select for both the FlowLayout layout type, and configure it to align to center. This allows us to center the elements within the containers.&lt;br /&gt;We drag a label into the top first of these two containers, set its UIID to Container and set its icon to the map image.&lt;br /&gt;We drag a List to the second container and configure its orientation to be Horizontal. You should end up with something that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-9G6S67eZfY4/TrfAUYeD6YI/AAAAAAAAK48/GTYGCWMUB58/s1600/Screen+Shot+2011-11-07+at+13.25.54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="161" src="http://3.bp.blogspot.com/-9G6S67eZfY4/TrfAUYeD6YI/AAAAAAAAK48/GTYGCWMUB58/s320/Screen+Shot+2011-11-07+at+13.25.54.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We will implement the list bellow in the next part but lets at least finish the main sections of the top part... Go to the top container (the one I called Container1 which we placed in the Center) and set its layout to border layout, drag a container into its center area.&lt;br /&gt;Set the UIID of that new container to MainList and its layout to box layout Y.&lt;br /&gt;Edit its style by right clicking it and selecting Style-&amp;gt;Unselected, in the derive tab type in "Container". Select the border tab and click the image border wizard.&lt;br /&gt;Use pick image to pick the list image here:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-GlDHxpheabo/TrECTsrjaRI/AAAAAAAAK3k/TOTmM8M4LA4/s1600/list_background.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-GlDHxpheabo/TrECTsrjaRI/AAAAAAAAK3k/TOTmM8M4LA4/s320/list_background.png" width="281" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And fill out the cutting setting as such with 30 px for every direction and Low/Medium multi-image generation:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-xpEjH4C6DL0/TrfCZKyYJpI/AAAAAAAAK5E/s_z2wfnI33M/s1600/Screen+Shot+2011-11-07+at+13.34.35.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://2.bp.blogspot.com/-xpEjH4C6DL0/TrfCZKyYJpI/AAAAAAAAK5E/s_z2wfnI33M/s320/Screen+Shot+2011-11-07+at+13.34.35.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After pressing the generate button close the wizard and select the margin tab, define 10 pixels for every direction and click OK.&amp;nbsp; &lt;br /&gt;This should produce something like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-zCQikM8egDo/TrfEECpFtMI/AAAAAAAAK5M/Mh5EJroVDXw/s1600/Screen+Shot+2011-11-07+at+13.40.55.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="154" src="http://2.bp.blogspot.com/-zCQikM8egDo/TrfEECpFtMI/AAAAAAAAK5M/Mh5EJroVDXw/s320/Screen+Shot+2011-11-07+at+13.40.55.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next time I will continue from this point to complete the UI of the first form.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span id="goog_639425034"&gt;&lt;/span&gt;&lt;span id="goog_639425035"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-6445223973604637844?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/6445223973604637844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-iii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6445223973604637844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6445223973604637844'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-iii.html' title='Places Demo Part III'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-aHm492FjCB4/Tre3yJ3XjFI/AAAAAAAAK4E/daJejm0WMAQ/s72-c/Screen+Shot+2011-11-07+at+12.48.32.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-344886143235474017</id><published>2011-11-02T02:22:00.000-07:00</published><updated>2012-02-03T11:47:31.792-08:00</updated><title type='text'>Places Demo Part II</title><content type='html'>In the &lt;a href="http://lwuit.blogspot.com/2011/10/places-demo-graphics-designer-bof.html"&gt;first part&lt;/a&gt; of this series I went over the image Martin and Chen produced, in this part I'll review the path that needs to be taken in order to take this image and make it into an actual application fit for all devices.&lt;br /&gt;&lt;br /&gt;The first part is divide &amp;amp; conquer, we need to divide the image into its basic elements:&lt;br /&gt;Backgrounds&lt;br /&gt;Component looks&lt;br /&gt;Content&lt;br /&gt;&lt;br /&gt;Photoshop makes this division relatively easy since it already divides elements to layers, although often these layers make sense in photoshop and not within our application. So reviewing this image:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-0eDvLeSWzUc/TqZZ5TliwxI/AAAAAAAAK2U/r3FfjoH-CwY/s1600/skyline.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-0eDvLeSWzUc/TqZZ5TliwxI/AAAAAAAAK2U/r3FfjoH-CwY/s320/skyline.jpg" width="160" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We have the following elements in the background:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Gradient from 00d8fe to black: &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-jKrzDYwhJNs/TrDakAngyhI/AAAAAAAAK3E/4QS_gn_-oIw/s1600/skyline_background_gradient.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-jKrzDYwhJNs/TrDakAngyhI/AAAAAAAAK3E/4QS_gn_-oIw/s320/skyline_background_gradient.jpg" width="160" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Translucent texture image, notice that this image is translucent and it appears here on the background of the blog. When layered on the gradient it will look quite different:&lt;br /&gt;&lt;/li&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-VDbL3A8RqR0/TrDbUJ6xo4I/AAAAAAAAK3M/Iv8nF_Y-uOE/s1600/skyline_texture_background.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-VDbL3A8RqR0/TrDbUJ6xo4I/AAAAAAAAK3M/Iv8nF_Y-uOE/s320/skyline_texture_background.png" width="269" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/ul&gt;&lt;br /&gt;Effectively these two come together to form a background like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-SkfZSuX6Te0/TrEAQsLBiVI/AAAAAAAAK3U/PZlpyIeZCtY/s1600/skyline_background.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-SkfZSuX6Te0/TrEAQsLBiVI/AAAAAAAAK3U/PZlpyIeZCtY/s320/skyline_background.jpg" width="160" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Notice the color at the top its actually the area where the title bar background should reside, that is a part of the title component design.&lt;br /&gt;&lt;br /&gt;The components within the design are far more complex, there are easy elements such as the title:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-0FYg2KcVg8Q/TrEBIk8W-YI/AAAAAAAAK3c/wn31_qiDfwY/s1600/title.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="39" src="http://4.bp.blogspot.com/-0FYg2KcVg8Q/TrEBIk8W-YI/AAAAAAAAK3c/wn31_qiDfwY/s320/title.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And the list background:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-GlDHxpheabo/TrECTsrjaRI/AAAAAAAAK3k/TOTmM8M4LA4/s1600/list_background.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-GlDHxpheabo/TrECTsrjaRI/AAAAAAAAK3k/TOTmM8M4LA4/s320/list_background.png" width="281" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Which are both pretty easy. It gets complicated when looking at an element like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-sQX8dNiUoK8/TrEEEH_S6wI/AAAAAAAAK3s/Ow1YN9ozxfU/s1600/sample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="67" src="http://3.bp.blogspot.com/-sQX8dNiUoK8/TrEEEH_S6wI/AAAAAAAAK3s/Ow1YN9ozxfU/s320/sample.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Obviously the word Bars is part of the foreground its just here for visualization. As you can see the round portion of the cup fits snugly into the button, because it contains and icon and is aligned perfectly to that icon it can't be separated from that icon.&lt;br /&gt;Yet because it aligns to the button and the button needs to grow with the text within it we might end up with something that looks like that:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-qrLWL-OU54w/TrEJXAHUiPI/AAAAAAAAK30/HxGKVxRN9KI/s1600/sample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://1.bp.blogspot.com/-qrLWL-OU54w/TrEJXAHUiPI/AAAAAAAAK30/HxGKVxRN9KI/s320/sample.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Which is obviously very far from the original design! There is no way to actually solve this problem that would be truly satisfying so we will make some compromises.&lt;br /&gt;We will treat this element as the component:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-SumQPQwiNv8/TrEKgG36VsI/AAAAAAAAK38/QkrGnVwLssY/s1600/list_entry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="67" src="http://4.bp.blogspot.com/-SumQPQwiNv8/TrEKgG36VsI/AAAAAAAAK38/QkrGnVwLssY/s320/list_entry.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;And we will always scale the icon on the left to fit that element so it will be covered perfectly. Its not an ideal solution since it requires scaling the background image which can cause degradation.&lt;br /&gt;&lt;br /&gt;The rest of the images and the text within the application are really just the content, this separation is critical since elements that are background elements should be incorporated in the theme and elements that represent content should be incorporated into the UI.&lt;br /&gt;&lt;br /&gt;In the next post I will start explaining how to move this logic into the resource editor and create the UI for this demo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-344886143235474017?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/344886143235474017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/344886143235474017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/344886143235474017'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/11/places-demo-part-ii.html' title='Places Demo Part II'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-0eDvLeSWzUc/TqZZ5TliwxI/AAAAAAAAK2U/r3FfjoH-CwY/s72-c/skyline.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2269034311370895509</id><published>2011-10-24T23:53:00.000-07:00</published><updated>2012-02-03T11:47:31.785-08:00</updated><title type='text'>Places Demo &amp; The Graphics Designer BoF</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-0eDvLeSWzUc/TqZZ5TliwxI/AAAAAAAAK2U/r3FfjoH-CwY/s1600/skyline.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-0eDvLeSWzUc/TqZZ5TliwxI/AAAAAAAAK2U/r3FfjoH-CwY/s400/skyline.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;With the uncertainty of travel arrangements to JavaOne we didn't prepare anything for the Graphics Designer BoF &amp;amp; just intended to review our existing demos.&lt;br /&gt;A day before the BoF Martin created this Graphic PSD, he and Chen worked quite allot to get it into a working demo state. I initially dismissed the attempt to do this when I glanced at the graphic he prepared, there are several "mistakes" you can see in the graphics if you have any experience in building UI's to scale to multiple resolutions/devices.&lt;br /&gt;&lt;br /&gt;The first and obvious "mistake" is the background, its a texture. If we will scale it, it would look "odd" and when a device is rotated we won't have an option. Not to mention supporting multiple device resolutions.&lt;br /&gt;Sure we can add a version for every resolution but once you start going down that path you enter the maintenance hell that is the true cost of software development.&lt;br /&gt;&lt;br /&gt;The second mistake isn't quite as obvious, the icons for the 4 options are round and perfectly aligned to the content. This might not seem like a problem but it is quite a big one. The font will have different sizes on different devices (due to device density variation) but the icons have a fixed size that doesn't depend on the font size. Due to the box that surrounds the font the text effectively becomes dependent on the icon size. So the text might appear grotesquely small or freakishly large in comparison to the icon and the box that surrounds it.&lt;br /&gt;Martin "solved" this by using a bitmap font, however that's a poor solution since it might look good on one device and awful on a higher/lower DPI device.&lt;br /&gt;&lt;br /&gt;The last major issue isn't as obvious, the map on the bottom wouldn't have enough space in landscape mode due to the large amounts of whitespace distributed all around.&lt;br /&gt;This might actually be the easiest issue to resolve by moving the map graphic to the side in landscape mode.&lt;br /&gt;&lt;br /&gt;Its unclear from the graphic but Martin intended to have the map animate and the cities in the bottom to be swipeable, Chen and Martin actually implemented this full demo with a few additional screens not shown here. In the next few weeks I will try to go over the process of creating a demo like this from a PSD deliverable and adapting that demo to partially resolve these various issues I raised.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2269034311370895509?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2269034311370895509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/10/places-demo-graphics-designer-bof.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2269034311370895509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2269034311370895509'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/10/places-demo-graphics-designer-bof.html' title='Places Demo &amp;amp; The Graphics Designer BoF'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-0eDvLeSWzUc/TqZZ5TliwxI/AAAAAAAAK2U/r3FfjoH-CwY/s72-c/skyline.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-7024646705612153380</id><published>2011-10-19T21:54:00.000-07:00</published><updated>2012-02-03T11:47:31.979-08:00</updated><title type='text'>Interview and HOL</title><content type='html'>&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0" height="360" id="flashObj" width="640"&gt;&lt;param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&amp;isUI=1" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;param name="flashVars" value="videoId=1190522301001&amp;playerID=1217746023001&amp;playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3x1llKvCBQgVazGCPhNSKRX&amp;domain=embed&amp;dynamicStreaming=true" /&gt;&lt;param name="base" value="http://admin.brightcove.com" /&gt;&lt;param name="seamlesstabbing" value="false" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="swLiveConnect" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&amp;isUI=1" bgcolor="#FFFFFF" flashVars="videoId=1190522301001&amp;playerID=1217746023001&amp;playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3x1llKvCBQgVazGCPhNSKRX&amp;domain=embed&amp;dynamicStreaming=true" base="http://admin.brightcove.com" name="flashObj" width="640" height="360" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Here is a LWUIT interview I did at J1. I was sick and after a long flight, normally I'm more eloquent...&lt;br /&gt;&lt;br /&gt;The hands on lab that Daniel Green submitted and I wrote was refined by his team and is now an easier to follow PDF which you can download from the &lt;a href="https://oracleus.wingateweb.com/scheduler/eventcatalog/eventCatalogJavaOne.do"&gt;Java One content catalog&lt;/a&gt; by searching for 24682 and clicking the small PDF icon that appears next to the session details. Thanks to &lt;a href="http://terrencebarr.wordpress.com/2011/10/18/new-lwuit-tutorial-available/"&gt;Terrence&lt;/a&gt; for that tip.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-7024646705612153380?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/7024646705612153380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/10/interview-and-hol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7024646705612153380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7024646705612153380'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/10/interview-and-hol.html' title='Interview and HOL'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-9078675045116102907</id><published>2011-10-10T23:54:00.000-07:00</published><updated>2012-02-03T11:47:31.990-08:00</updated><title type='text'>Back From J1 2011</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-HKSeEUs6_0Y/TpPmTrZIhFI/AAAAAAAAKxA/g_gbGsNVpOc/s1600/SDC16898.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-HKSeEUs6_0Y/TpPmTrZIhFI/AAAAAAAAKxA/g_gbGsNVpOc/s320/SDC16898.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;JavaOne 2011 is finally over, its been a hectic week for us both because of the cramped timeline (we had to hurry back home due to complex holiday logistics) and because of the huge distance between my hotel and the venue. &lt;br /&gt;&lt;br /&gt;By all accounts this years J1 was bigger &amp;amp; better than last years although it wasn't the same as the old J1 in moscone. Hopefully the trend of improvement will persist to next year and the conference will be restored to its former glory.&lt;br /&gt;&lt;br /&gt;Despite the relatively weak attendance in the the mobility track and our own session (which had problematic scheduling) the BoF I had with Martin (in the picture above you see from left to right, Martin, myself &amp;amp; Chen) was pretty full. The hands on lab was also full although it was mired by an admin choosing to randomly reboot peoples PC's while they were working and problematic lab setup. Since we arranged this lab as a sort of last minute thing its amazing&amp;nbsp; that we got it off the ground and even had a decent attendance.&lt;br /&gt;&lt;br /&gt;Martin &amp;amp; Chen created a pretty cool demo for our BoF, when I get the time I will clean it up and create something more robust based on it. Right now my desk is full with so many tasks postponed to "after" JavaOne.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-9078675045116102907?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/9078675045116102907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/10/back-from-j1-2011.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9078675045116102907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9078675045116102907'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/10/back-from-j1-2011.html' title='Back From J1 2011'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-HKSeEUs6_0Y/TpPmTrZIhFI/AAAAAAAAKxA/g_gbGsNVpOc/s72-c/SDC16898.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-8296863213052795213</id><published>2011-09-30T02:02:00.000-07:00</published><updated>2012-02-03T11:47:31.984-08:00</updated><title type='text'>My Music Cloud Finally Available</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://a2.sphotos.ak.fbcdn.net/hphotos-ak-ash4/307189_248275755207787_212806222088074_625617_1089202011_n.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="400" src="http://a2.sphotos.ak.fbcdn.net/hphotos-ak-ash4/307189_248275755207787_212806222088074_625617_1089202011_n.jpg" width="248" /&gt;&lt;/a&gt;&lt;/div&gt;Remember Triplay? They guys behind the &lt;a href="http://lwuit.blogspot.com/2011/02/musix-under-skin.html"&gt;musix application.&lt;/a&gt; They are back now with &lt;a href="http://www.mymusiccloud.com/"&gt;My Music Cloud&lt;/a&gt;, a music service similar in a way to Google Music effort with a few advantages such as being available internationally on all devices etc.&lt;br /&gt;The service essentially downloads music to the device from the cloud server and allows you to purchase additional music directly to the cloud server.&lt;br /&gt;&lt;br /&gt;The entire application is based on LWUIT with the exception of the iPhone port. The J2ME, Blackberry &amp;amp; Android versions of the application were implemented using the LWUIT GUI builder.&lt;br /&gt;&lt;br /&gt;Unlike the musix application which was operator bound you can check the MMC application right now by going to &lt;a href="http://www.mymusiccloud.com/"&gt;their website&lt;/a&gt; right now and following the instructions to try out this application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-8296863213052795213?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/8296863213052795213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/09/my-music-cloud-finally-available.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8296863213052795213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8296863213052795213'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/09/my-music-cloud-finally-available.html' title='My Music Cloud Finally Available'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1896976805370602959</id><published>2011-09-27T21:13:00.000-07:00</published><updated>2012-02-03T11:47:31.783-08:00</updated><title type='text'>Major LWUIT Developer Purchased For 300M USD</title><content type='html'>&lt;a href="http://global.telmap.com/"&gt;Telmap&lt;/a&gt; was just &lt;a href="http://www.themarker.com/hitech/1.1485359"&gt;purchased by Inte&lt;/a&gt;l for the sum of 300,000,000, they haven't made an announcement though. While a huge portion of their effort is the server side and that deserves a great deal of their value, I can't think of a single company who bet more heavily on LWUIT.&lt;br /&gt;In a recent visit to their headquarters they showed us pretty spectacular things such as their LWUIT port to native Windows Phone 7 and a tool that allows them to modify and preview resource files on devices. Very cool.&lt;br /&gt;Telmap adopted LWUIT at a time when it had a fraction of the features it had today and used it to get their applications UI far and wide into the devices of the world. Their Android port is based entirely on LWUIT and the work from &lt;a href="http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CBkQFjAA&amp;amp;url=http%3A%2F%2Fwww.pader-sync.com%2Flwuit-for-blackberry-and-android.html&amp;amp;rct=j&amp;amp;q=pader%20sync%20LWUIT%20on%20android&amp;amp;ei=wJ2CTufTAqGh0QXeiLDTAQ&amp;amp;usg=AFQjCNFuFn2Vd4Jifk6dtHoaWWfPFknfLA&amp;amp;cad=rja"&gt;Thorsten&lt;/a&gt; and their RIM port as well. &lt;br /&gt;Telmap has also made one of the most elaborate LWUIT source contributions for RTL (right - to left, bidi) support, displaying their faith in the open source model and giving back to the community.&lt;br /&gt;&lt;br /&gt;Congratulations guys on a well deserved exit and recognition of your efforts!&lt;br /&gt;&lt;br /&gt;Update: The story has made it to the usual guys, here is an &lt;a href="http://www.slashgear.com/intel-grabs-telmap-for-cross-platform-appup-location-services-30184228"&gt;English article in Slashgear&lt;/a&gt;. BTW I neglected to mention that during our visit to Telmap headquarters we talked quite a bit about their future and past with LWUIT. The technical guys were very bullish on LWUIT and indicated that they have no intention of shifting direction. They claim that they save a fortune in maintenance costs by focusing on a single code base, their mobile team is indeed quite small relatively to the complexity of their application and the amounts of platforms supported.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1896976805370602959?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1896976805370602959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/09/major-lwuit-developer-purchased-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1896976805370602959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1896976805370602959'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/09/major-lwuit-developer-purchased-for.html' title='Major LWUIT Developer Purchased For 300M USD'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5869707700246684276</id><published>2011-09-18T03:59:00.000-07:00</published><updated>2012-02-03T11:47:31.963-08:00</updated><title type='text'>LWUIT and Facebook API - by Chen Fishbein</title><content type='html'>&lt;div&gt;Nowadays almost every app needs to be connected to facebook in some level: post a message to your friends wall, post on your wall, like a post, etc...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We are well aware of such need and we are well aware of the lack of support for J2ME devices.&lt;/div&gt;&lt;div&gt;Connect an app to facebook sounds something trivial that every smart phone is doing very easily, but doing the same on a J2ME device is almost impossible.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Facebook uses Oauth2 to authenticate which basically means you need a browser to display the login page and the ability to handle a session on the client until login is authenticated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the last couple of months we worked very hard to finally offer such solution to LWUIT developers, now you can use a very simple API to access Facebook.(it's important to note that this won't work on all J2ME devices, due to a relatively new/complex certificate facebook is using, which some old devices has difficulties with, even the good old WTK won't work - this will require a nokia SDK or the upcoming SDK 3.0.5 from Oracle which should be released soon)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The new API has a new Demo which is available from our svn:&lt;/div&gt;&lt;div&gt;https://svn.java.net/svn/lwuit~svn/trunk/Apps/FaceBookDemo&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In addition we created an official facebook lwuit page which is open for lwuit discussions&lt;/div&gt;&lt;div&gt;&lt;a href="https://www.facebook.com/pages/Lwuit/132932836804285"&gt;https://www.facebook.com/pages/Lwuit/132932836804285&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some API samples:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//authenticate your facebook app with the permissions you need&lt;/div&gt;&lt;div&gt;&lt;div&gt;FaceBookAccess.getInstance().authenticate(appid&lt;appid&gt;, redirect_uri&lt;redirect-uri&gt;&lt;appid&gt;, &lt;redirect_uri&gt;new String[]{"user_photos", "friends_photos", "publish_stream", "read_stream", "user_relationships", "user_birthday", "friends_birthday", "friends_relationships", "read_mailbox", "user_events", "friends_events", "user_about_me"});&lt;/redirect_uri&gt;&lt;/appid&gt;&lt;/redirect-uri&gt;&lt;/appid&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//then create a User Object and ask the FaceBookAccess to fill it with the data&lt;/div&gt;&lt;div&gt;User me = new User();&lt;/div&gt;&lt;div&gt;FaceBookAccess.getInstance().getUser("me", me, null);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://screencast.com/t/5oV1MYjOdDG"&gt;&lt;iframe width="425" height="349" src="http://www.youtube.com/embed/6afeZEP6ed0?hl=en&amp;amp;fs=1" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5869707700246684276?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5869707700246684276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/09/lwuit-and-facebook-api-by-chen-fishbein.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5869707700246684276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5869707700246684276'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/09/lwuit-and-facebook-api-by-chen-fishbein.html' title='LWUIT and Facebook API - by Chen Fishbein'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/6afeZEP6ed0/default.jpg' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2889416679352537712</id><published>2011-09-15T04:01:00.000-07:00</published><updated>2012-02-03T11:47:31.789-08:00</updated><title type='text'>Recipe Book HOL Draft</title><content type='html'>&lt;span id="internal-source-marker_0.1533423932650423" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;This is a quick draft of my hands on lab for JavaOne where we go over creating a GUI builder Recipe book application. Let me know what you think.&lt;/span&gt;&lt;br /&gt;&lt;span id="internal-source-marker_0.1533423932650423" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span id="internal-source-marker_0.1533423932650423" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Launch the LWUIT Resource Editor application from the utils directory under the LWUIT distribution directory.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Create a new basic wood theme in the theme tab&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&lt;/span&gt;&lt;img height="320px;" src="https://lh4.googleusercontent.com/Bmsi5gLUAIJw_QNdOBWhGACZxEhRXN26_CuFG780skXtzesqo_yRXfRv7sBVSHfWHVChOQn1jcqdX8HZ5zx27CeKuPZzpf77gha62co7kDTiFfRfDeM" width="526px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go to the UI Tab in the resource editor and add a new UI entry, name it “Splash Screen” to create a new splash screen.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Set its layout to border layout with “absolute center” place a label in the center and give it the text Recipe Book.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;At the south area place a slider component, set it to infinite mode and set its text to an empty string.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&lt;/span&gt;&lt;img height="436px;" src="https://lh6.googleusercontent.com/Zh2afcFvhFoA_9DvHpHiBlmZP_2w-OlTop7xlcbHtvwDRi2DZ_Ivo5s9aqz0_BxI5NB_WhQoRiSw3Re3MLXo05dNye3GCvZZtf6Gdj2jIPNmvFF1EC4" width="671px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Create a new GUI form and name it Main. Go back to the Splash Screen and define next form as Main.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Set the title of Main to “Recipe Book”, set the layout to BoxLayout Y so elements may be organized from top to bottom.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Drag a Container into the form and select it. Set its layout to GridLayout with 2 rows and two columns.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Drag 4 buttons into that container and name them add, edit, exit &amp;amp; settings. Make sure to update their labels as well. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Use the “Images-&amp;gt;Add Images” menu item and select the images add.png, edit.png, exit.png &amp;amp; settings.png&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;img height="47px;" src="https://lh6.googleusercontent.com/nAydgIJjFhUubvUptxStNOoZ0X3TY-cnDBg-JuacBSAhadv_wwCScIcTSDJ5Vz3wiOaxgalJ63XysJevmIVBTuU0wWbySXG2iGPWxdTlBCvaJKF_EL4" width="47px;" /&gt;&lt;img height="47px;" src="https://lh3.googleusercontent.com/mAbmko6vvfYlOJvUy5fDf4tgWPjmkRq-JghM_ryHkl5LKLR7qtyhAH8afPFxWo2Vnk0Yzb46Lnoo5Vae3Uvqg6c_1yMCnDzLabwtyLdSsoUzIkIS538" width="47px;" /&gt;&lt;img height="47px;" src="https://lh6.googleusercontent.com/-z6PL9PXP5K47gFo3_k0J6LcZZsLO26lIpA6-hmZ6gky5DSD0qtU97-MYmOP8JUoDtNN7E_B9IBRr5f0p4zB3cHtxTIanAFYdh78B5ZGDgjQM7OpHi8" width="47px;" /&gt;&lt;img height="47px;" src="https://lh4.googleusercontent.com/x_h0nVSqfpH3-2fxKKORiPQjzG3wVzYQ7Kl3nIuINrEbTibMECFxMXLhQn0JxFhlxh7sqHtvFYnOhypfJ4_55eBZKCWqqONMBWFPE6KDAY984Rr5VUs" width="47px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go  to each of the buttons, select the appropriate icon and set the text  position to bottom. You should end up with a form that looks like this:&lt;/span&gt;&lt;img height="419px;" src="https://lh3.googleusercontent.com/HirXOqqi7dl-oN3mbrj1JIzKMvWTWqzgK9JWw-_ndRHmGFC-ZKO3NClBqnVrNxC9hXwp6VnTee-tkgfWlWOWaUc7B1a0GsO2_AXcYXpmeyQr46hNDpA" width="641px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Create  a new form and call it “Add Recipe” go back to the main form and select  the add button. In the properties section click the Command entry,  leave most of the defaults select the Action to point at “Add Recipe”  which will trigger navigation to the add recipe page.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&lt;/span&gt;&lt;img height="321px;" src="https://lh5.googleusercontent.com/yxu5qN7USUJPYtN0GqR_vX7xA7U24UswKaURUJfzLwSg29YeabZLDjYm19cH7JLFcXrS_vfz-yIlH3u7ju2RQ_oTZMcHGj7S4T1Qv3nZ8OSyaOOzMjQ" width="543px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Click the exit button and click the command for that button, select the “Exit” action for this button.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Select  the “Add Recipe” form and click the form. Set the title to “Add Recipe”  set the layout to border layout. Drag a container into the North  portion of the form and set its layout to table layout with 2 columns  and 4 rows.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Drag the following components into the table layout container 4 labels, text field, combo box, text area &amp;amp; button.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Arrange  the elements within the table layout container either by dragging on  the tree or within the UI place all the labels to the left and arrange  the component order so the text field is first, the combo box second the  text area third and the button last.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Give the labels the following text: “Title”, “Type”, “Steps” &amp;amp; “Image”.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Give  the components equivalent names to the labels besides them: text field =  title, combo box = type, text area = steps &amp;amp; button = image.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Set the text of the text field to an empty string.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Click  the list items entry in the combo box and remove all the “Item *”  entries. Add 3 entries by selecting the String radio button and typing  in the text field bellow the table. “Savory”, “Sweet” &amp;amp; “Spicy”:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&lt;/span&gt;&lt;img height="234px;" src="https://lh3.googleusercontent.com/Mt8AM03e8JRHCG2LFgFVYoxAPPBOOVqw_AKf4NJ-y64aKfMC8aCz0Dq-VfhGiEOA5wughX6MAeDsiQHXaJDDNIqvf0TNzyulj3mOKWFo5LBYRZh72EE" width="516px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;This should be the result:&lt;/span&gt;&lt;br /&gt;&lt;img height="178px;" src="https://lh3.googleusercontent.com/NuQ_RQcSqNMDiCcbz27bzJVbvNBKCWtCbxtNYIa_tCEW1pzgIWYxfhS0bG9PigqNhlQ4MQNe6Icdp_20Isp-UdDJhQHt5YWyoCXXCMZDbqY7eoTFHCA" width="301px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Select the text area and clear the current text, set columns to 20 and rows to 5.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Select the “Steps” label next to the text area, click “Layout Constraints” and set the vertical align to top.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Select the button and set its text to “...”, set its UIID to “Label”.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;You should end up with this:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&lt;/span&gt;&lt;img height="382px;" src="https://lh3.googleusercontent.com/XKJKCB5BWDzEPDXHksC5EG43ZTKles-JgR6TiHl1UQwxfdKKKjz_Nyj6LkBSgPUxwovLsu8ByvHOOHPxtNSVBg66ErexS-5XKu_y0VHn-Hud4W_wzFc" width="588px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Now  you can actually go to the “Theme” section in the resource editor and  play with a live functioning version of your application. Within the  theme select the “Preview Settings” button and select “Splash Screen” as  the first form.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Select the Menu Item “Application-&amp;gt;Generate Netbeans Project”.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;You will be prompted to select the main screen select the “Splash Screen”&lt;/span&gt;&lt;img height="121px;" src="https://lh6.googleusercontent.com/dWI9KTCdUpcuvmxlJ-8he9tCj214SuQIefujVZJ8ye_ayyo3bFMWmnlda1aS15K7Ic3WfF1TBDMkcavOCL-V1NXyGQo5-MFpa3fg6V-pPw65aBbx8v0" width="260px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Then you would be prompted for a project name, its probably best to avoid spaces or special characters in a project name:&lt;/span&gt;&lt;br /&gt;&lt;img height="115px;" src="https://lh5.googleusercontent.com/MVcELjvtOxqV9P3nuroyvWM3tkAB5YAanPXShASs65Azqe8lwc_Y86y_cx5iIzt4Epv08KycQGaZNik70ZwgXGfczzab2RyqLQvWVcCXgJgW7fYlKF8" width="250px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;You  will now receive a directory to which the project will be generated,  notice that if you saved the resource file previously this old copy  would be discarded and the resource file will now reside in the src  directory under the directory you have given.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;If  Netbeans isn’t detected you will now be prompted to find the Netbeans  executable under Program Files. Once the project is generated you should  have 4 projects in Netbeans: &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;RecipeBook - Main library project where the cross platform LWUIT code &amp;amp; resources reside&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;RecipeBook_Desktop  - Port to Java SE allowing you to rapidly run your code on the desktop  and also generate Applets from LWUIT applications.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;RecipeBook_RIM - Enables building native RIM applications from LWUIT applications.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;RecipeBook_MIDP - Enables building MIDlets for J2ME mobile devices&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Some  of the projects might be marked in red for unresolved dependencies due  to different emulator settings etc. If the RIM project is marked in red  ignore it for now since it requires setting up a RIM environment. For  the other projects right click the project and select properties, select  Platform and make sure the proper environment is configured as CLDC  1.1, MIDP 2.0 and all the optional packages are checked (this is mostly  for compilation and isn’t required in runtime).&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go  back to the resource editor and select the “Add Recipe” form click the  “Commands” entry and select “Add”. Type “Add” as the name of the  command, select “Main” as the action of the command and click the “Go To  Source” button (if Netbeans pops up go back to the resource editor)  click OK to dismiss the dialog and press the save button in the resource  editor toolbar (whenever save is pressed code is generated).&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go to Netbeans you should see the source code for the “Add” command callback:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected boolean onAddRecipeAdd() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean val = super.onAddRecipeAdd();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return val;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;  What we have is a method that will be invoked before the command is  processed we can add our custom code to save the data. First lets create  a recipe object, right click the userclasses package and select “New  Class”. Give the class the name Recipe and enter the following fields:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String title;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int type;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String steps;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private byte[] image;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Select the menu “Refactor-&amp;gt;Encapsulate Fields” and select all the fields so you will have getters/setters for the fields.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Add an implements Externalizable to the class and make sure to import com.sun.lwuit.io.Externalizable.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;You will be prompted to implement the missing methods, accept this prompt which will generate the following method stubs:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int getVersion() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void externalize(DataOutputStream out) throws IOException {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void internalize(int version, DataInputStream in) throws IOException {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getObjectId() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Make sure to import com.sun.lwuit.io.util.Util for the following step, implement these methods as such:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int getVersion() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 1;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void externalize(DataOutputStream out) throws IOException {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Util.writeUTF(title, out);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out.writeInt(type);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Util.writeUTF(steps, out);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(image == null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out.writeInt(0);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out.writeInt(image.length);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out.write(image);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void internalize(int version, DataInputStream in) throws IOException {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;title = Util.readUTF(in);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type = in.readInt();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;steps = Util.readUTF(in);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int s = in.readInt();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(s == 0) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;image = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;image = new byte[s];&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;in.readFully(image);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String getObjectId() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return "Recipe";&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go back to the state machine to the onRecipeAdd method and add the following code:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;protected boolean onAddRecipeAdd() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean val = super.onAddRecipeAdd();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Form root = Display.getInstance().getCurrent();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Recipe entry = new Recipe();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entry.setTitle(findTitle(root).getText());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entry.setSteps(findSteps(root).getText());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entry.setType(findType(root).getSelectedIndex());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EncodedImage e = (EncodedImage)findImage(root).getIcon();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(e != null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;entry.setImage(e.getImageData());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vector recipes = (Vector)Storage.getInstance().readObject("recipes");&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(recipes == null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;recipes = new Vector();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; recipes.addElement(entry);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Storage.getInstance().writeObject("recipes", recipes);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return val;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;In the initVars method of the state machine you must register the recipe class as such so the deserialization code can work:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Util.register("Recipe", Recipe.class);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go to the Main class in the Desktop project and the MIDP project and add this code just bellow the Display.init() call :&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Storage.init("RecipeBook");&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetworkManager.getInstance().start();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go  to the resource editor and select the “...” image button, in the tabs  pick the events tab and click “Action Event”. This should create a new  method in the state machine class:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void onAddRecipe_ImageAction(Component c, ActionEvent event) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// If the resource file changes the names of components this  call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;super.onAddRecipe_ImageAction(c, event);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Update the code to allow image picking:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;protected void onAddRecipe_ImageAction(final Component c, ActionEvent event) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.onAddRecipe_ImageAction(c, event);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; final GoogleRESTService r = new GoogleRESTService(findTitle(c.getParent()).getText(), GoogleRESTService.IMAGE_SEARCH);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r.setResultSize(8);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; final Progress p = new Progress("Searching", r);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.showPacked(BorderLayout.CENTER, false);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r.addResponseListener(new ActionListener() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void actionPerformed(ActionEvent ae) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p.dispose();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vector results = r.getResults();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Container options = new Container();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int iter = 0 ; iter &amp;lt; results.size() ; iter++) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(results.elementAt(iter) instanceof GoogleRESTService.ResultEntry) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GoogleRESTService.ResultEntry e = (GoogleRESTService.ResultEntry)results.elementAt(iter);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(e.getTbUrl() != null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Button selection = new Button();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options.addComponent(selection);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ImageDownloadService img = new ImageDownloadService(e.getTbUrl(), selection);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetworkManager.getInstance().addToQueue(img);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selection.addActionListener(new ActionListener() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void actionPerformed(ActionEvent ae) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;((Dialog)Display.getInstance().getCurrent()).dispose();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;findImage(c.getParent()).setIcon(((Button)ae.getComponent()). getIcon());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c.getComponentForm().revalidate();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Command cancel = new Command("Cancel");&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dialog.show("Pick Image", options, new Command[] {cancel});&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetworkManager.getInstance().addToQueue(r);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Create  a new form in the resource editor called “List Recipes”, go back to the  Main form and edit the command for the “Edit” button so its action will  be “List Recipes”.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go  back to “List Recipes” and set the layout to BorderLayout, uncheck the  scrollable Y property, set the title to “List Recipies” and drag a list  to the center. Select the List and name it recipeList, move to the  events tab and click List Model.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;You should end up with something that looks like this:&lt;/span&gt;&lt;img height="407px;" src="https://lh5.googleusercontent.com/waprKVfcqhDH5gY03KACbdIXla4_xC5gU_2gI8e4acSFkQjbNRJQuLhZZjQ-_y_AiRhPeH4sgZDf0ACKLRH88RBMG-ghqyCkvueJgPnpsAwF-BhG3fs" width="602px;" /&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Save the resource and go to Netbeans where a new method should appear:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;protected boolean initListModelRecipeList(List cmp) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.initListModelRecipeList(cmp);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp.setModel(new DefaultListModel(YourDataHere));&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Replace the setModel line with this code:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;cmp.setModel(new DefaultListModel((Vector)Storage.getInstance().readObject("recipes")));&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;cmp.setRenderer(new DefaultListCellRenderer(false) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public Component getCellRendererComponent(Component list, Object model, Object value, int index, boolean isSelected) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(value instanceof Recipe) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Recipe r = (Recipe)value;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;super.getCellRendererComponent(list, model, r.getTitle(), index, isSelected);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;setIcon(r.getEncodedImage());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return this;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return super.getCellRendererComponent(list, model, value, index, isSelected);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go to the Recipe class and add the following code to allow image caching: &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private EncodedImage img;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public EncodedImage getEncodedImage() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(image == null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;img = null;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(img == null || img.getImageData() != image) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; img = EncodedImage.create(image);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return img;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;In the Resource Editor select the Add Recipe form and select the menu item “Edit-&amp;gt;Duplicate”.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Call the new form “Edit Recipe”.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Change the title for the form to “Edit Recipe”. Remove the “Add” command from the form and add a “Save” command instead.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go  back to the “List Resources” form and select the List &amp;amp; the events  tab, within it select action event for the list. Go to Netbeans where  you should see the code:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;protected void onListRecipes_RecipeListAction(Component c, ActionEvent event) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.onListRecipes_RecipeListAction(c, event);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Add the offset field to the State machine class:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int offset;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Then add the following code into the onListRecipes_RecipeListAction method:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offset = findRecipeList(c.getParent()).getSelectedIndex();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showContainer("Edit Recipe", null, c);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go  back to the resource editor and select the “Edit List” form, select the  “Events” tab and click “Before Show”. Go to Netbeans where you should  see this method:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void beforeEditRecipe(Form f) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.beforeEditRecipe(f);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Insert the following code into the method:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vector recipes = (Vector)Storage.getInstance().readObject("recipes");&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Recipe r = (Recipe)recipes.elementAt(offset);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; findTitle(f).setText(r.getTitle());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; findSteps(f).setText(r.getSteps());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; findType(f).setSelectedIndex(r.getType());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; findImage(f).setIcon(r.getEncodedImage());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Select  the properties tab in the resource editor GUI builder and edit the  commands of the form, edit the save command. Set the action of the  command to list recipes. Click Go To source and press OK to close the  dialogs that are open. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go to Netbeans where you should now have:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected boolean onEditRecipeSave() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean val = super.onEditRecipeSave();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return val;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Insert the following code instead of the method body:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.onEditRecipeSave();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vector recipes = (Vector)Storage.getInstance().readObject("recipes");&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Recipe entry = (Recipe)recipes.elementAt(offset);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Form root = Display.getInstance().getCurrent();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entry.setTitle(findTitle(root).getText());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entry.setSteps(findSteps(root).getText());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entry.setType(findType(root).getSelectedIndex());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EncodedImage e = (EncodedImage)findImage(root).getIcon();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(e != null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;entry.setImage(e.getImageData());&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;entry.setImage(null);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Storage.getInstance().writeObject("recipes", recipes);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; back();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go  to the “Edit Recipe” form and add a command, name it “Delete” and press  “Go To Source”. Press OK for both dialogs and save the resource file. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Go to Netbeans where you should see the following code:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;protected boolean onEditRecipeDelete() {&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean val = super.onEditRecipeDelete();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return val;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;Insert the following lines instead of the method body:&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If the resource file changes the names of components this call will break notifying you that you should fix the code&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.onEditRecipeDelete();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vector recipes = (Vector)Storage.getInstance().readObject("recipes");&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; recipes.removeElementAt(offset);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Storage.getInstance().writeObject("recipes", recipes);&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; back();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2889416679352537712?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2889416679352537712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/09/recipe-book-hol-draft.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2889416679352537712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2889416679352537712'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/09/recipe-book-hol-draft.html' title='Recipe Book HOL Draft'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1421471507393570686</id><published>2011-08-31T08:33:00.000-07:00</published><updated>2012-02-03T11:47:31.778-08:00</updated><title type='text'>LWUIT Hands On Lab For Java One</title><content type='html'>I got tasked with writing a Hands On Lab (HoL) for JavaOne about LWUIT. For those of you who haven't been to a JavaOne (or Java Developer Day) HoL's are generally a bootcamp like class where you get your feet wet building a quick and dirty demo with a tool to get a feel of the tool.&lt;br /&gt;I already wrote a HoL for LWUIT a while back but it was before the GUI builder was ready and it required internet connectivity to actually work &amp;amp; provide value. The problem with the latter portion is that the internet connectivity might be flaky on people's laptops when everyone tries to reach webservice X in a crowded conference.&lt;br /&gt;&lt;br /&gt;So I'm working on a long overdue lab rewrite that will incorporate the latest and greatest resource editor GUI builder and LWUIT 1.5. Generally I would like to create something that is simple yet elegant and I will try to post most of the "how to" in the blog, to actually learn first hand from Chen and myself you would need to actually attend the lab.&lt;br /&gt;If you have any ideas which are simple enough for a first time mobile developer to implement and still show value without an internet connection (we can use some mockups etc. to get the point across) then feel free to post suggestions because I'm somewhat stumped with ideas. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1421471507393570686?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1421471507393570686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/08/lwuit-hands-on-lab-for-java-one.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1421471507393570686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1421471507393570686'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/08/lwuit-hands-on-lab-for-java-one.html' title='LWUIT Hands On Lab For Java One'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5558859120145619914</id><published>2011-08-24T08:31:00.000-07:00</published><updated>2012-02-03T11:47:31.956-08:00</updated><title type='text'>Resource Editor Mac Integration</title><content type='html'>&lt;iframe width="640" height="390" src="http://www.youtube.com/embed/6cfdxvl0SZY" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;I just uploaded a new version of the resource editor application which features much improved Mac OS integration to ease the work of designers who use a Mac with LWUIT. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5558859120145619914?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5558859120145619914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/08/resource-editor-mac-integration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5558859120145619914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5558859120145619914'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/08/resource-editor-mac-integration.html' title='Resource Editor Mac Integration'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/6cfdxvl0SZY/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-9046029878612141290</id><published>2011-08-22T01:17:00.000-07:00</published><updated>2012-02-03T11:47:31.987-08:00</updated><title type='text'>Fixing Netbeans RIM Integration On Windows 7 And Vista</title><content type='html'>For some reason which is entirely unclear to me the guys who implemented Netbeans RIM integration chose to copy the resulting COD files from the dist directory to the RIM program files directory effectively breaking this integration for newer MS OS's which fixed the faulty behavior of a user writeable program files directory.&lt;br /&gt;The problem is that the error you get is misleading, it claims that the directory is read only and when trying to change the read-only status windows "seems" to do some work but fails. The reason for the problem is permissions and fixing this problem is actually quite easy once you understand that.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First go to the Program Files directory (or Program files x86 for 64 bit machines) and select the RIM directory.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/--xp5rYcaHlQ/TlIQSqW3m6I/AAAAAAAAKGQ/uq9-_GJiluQ/s1600/file_browser_RIM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="227" src="http://4.bp.blogspot.com/--xp5rYcaHlQ/TlIQSqW3m6I/AAAAAAAAKGQ/uq9-_GJiluQ/s320/file_browser_RIM.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Right click and select properties, go to the security tab and click edit.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Hf5QeHWIYHc/TlIQYAFrxgI/AAAAAAAAKGU/tn0mrgodzFA/s1600/permissions_dialog_1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-Hf5QeHWIYHc/TlIQYAFrxgI/AAAAAAAAKGU/tn0mrgodzFA/s320/permissions_dialog_1.jpg" width="244" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Select your user name from the list and check the allow for all the boxes, click OK for all the dialogs (this will take a bit of time since the operation is recursive).&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-3tyPTq3BLkU/TlIQc3QrSII/AAAAAAAAKGY/aByggie-JS0/s1600/permissions_dialog_2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-3tyPTq3BLkU/TlIQc3QrSII/AAAAAAAAKGY/aByggie-JS0/s320/permissions_dialog_2.jpg" width="267" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-9046029878612141290?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/9046029878612141290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/08/fixing-netbeans-rim-integration-on.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9046029878612141290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9046029878612141290'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/08/fixing-netbeans-rim-integration-on.html' title='Fixing Netbeans RIM Integration On Windows 7 And Vista'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/--xp5rYcaHlQ/TlIQSqW3m6I/AAAAAAAAKGQ/uq9-_GJiluQ/s72-c/file_browser_RIM.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-9070447272172213703</id><published>2011-08-11T21:27:00.000-07:00</published><updated>2012-02-03T11:47:49.246-08:00</updated><title type='text'>Java Spotlight Podcast Interview With Chen Fishbein on LWUIT 1.5</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3qkn7jHA3lU/TkBWl5sBuxI/AAAAAAAAp2E/XZ453KA-2lk/GUI%252520Builder.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="154" src="http://1.bp.blogspot.com/-3qkn7jHA3lU/TkBWl5sBuxI/AAAAAAAAp2E/XZ453KA-2lk/GUI%252520Builder.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Roger Brinkly recorded this a while back in India (at the local JavaOne where Chen spoke) when we thought we would be releasing 1.5 soon. Regardless its a great interview and &lt;a href="http://blogs.oracle.com/javaspotlight/entry/java_spotlight_episode_42_chen"&gt;interesting podcast&lt;/a&gt; worth the listen especially if you haven't been following 1.5 news.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-9070447272172213703?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/9070447272172213703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/08/java-spotlight-podcast-interview-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9070447272172213703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9070447272172213703'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/08/java-spotlight-podcast-interview-with.html' title='Java Spotlight Podcast Interview With Chen Fishbein on LWUIT 1.5'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-3qkn7jHA3lU/TkBWl5sBuxI/AAAAAAAAp2E/XZ453KA-2lk/s72-c/GUI%252520Builder.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4793186163537997418</id><published>2011-08-11T01:18:00.000-07:00</published><updated>2012-02-03T11:47:49.083-08:00</updated><title type='text'>LWUIT 1.5 Released (finally!)</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Zibt-3W1Fts/TkK_ausgozI/AAAAAAAAqag/HqRJFEtwqIc/moz-screenshot.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="298" src="http://3.bp.blogspot.com/-Zibt-3W1Fts/TkK_ausgozI/AAAAAAAAqag/HqRJFEtwqIc/moz-screenshot.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;After multiple delays we are thrilled to announce the release of LWUIT 1.5 which you can download &lt;a href="http://www.oracle.com/technetwork/java/javame/javamobile/download/lwuit/index.html"&gt;here&lt;/a&gt;. This is probably the biggest, most complete release of LWUIT since version 1.0 hit the scene, it includes both groundbreaking changes and refinements to LWUIT core features.&lt;br /&gt;&lt;br /&gt;The major features of this release are:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;GUI Builder With major revamp of the Resource Editor tool&lt;/li&gt;&lt;br /&gt;&lt;li&gt;LWUIT4IO a tightly integrated Storage, Networking &amp;amp; Filesystem framework with ports to multiple platforms&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Far deeper theming including, theme constants,&amp;nbsp;declarative&amp;nbsp;style inheritance, disabled styles etc.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;New JavaSE &amp;amp; CDC ports allowing easier debugging/testing/profiling on the desktop as well as easier demos by deploying LWUIT applications as applets&lt;/li&gt;&lt;br /&gt;&lt;li&gt;New Components: &lt;ul&gt;&lt;li&gt;ContainerList allows variable row size list &amp;amp; complex list layouts&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Tabs&amp;nbsp;supersedes&amp;nbsp;the TabbedPane providing swipe gestures, elaborate theming and much more&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Slider provides progress indication and gauge control&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;New recommended project structure for demos allowing for easier porting to RIM/Desktop/CDC&lt;/li&gt;&lt;br /&gt;&lt;li&gt;PeerComponent allowing the embedding of native components within a LWUIT UI (applicable on some platforms)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Improved &amp;amp; simplified animations for layout effects&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Multi-Images and improved SVG support&lt;/li&gt;&lt;br /&gt;&lt;li&gt;HTML 4 tag support and public parser API for HTML/XML&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Virtual Keyboard is now builtin to LWUIT with deep support for native VKB input and toggling between multiple VKB's&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Focus rewritten from scratch to be more intuitive&amp;nbsp;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Performance/RAM improvements&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Drag &amp;amp; Drop API, copy and paste API and much more&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4793186163537997418?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4793186163537997418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/08/lwuit-15-released-finally.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4793186163537997418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4793186163537997418'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/08/lwuit-15-released-finally.html' title='LWUIT 1.5 Released (finally!)'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Zibt-3W1Fts/TkK_ausgozI/AAAAAAAAqag/HqRJFEtwqIc/s72-c/moz-screenshot.png' height='72' width='72'/><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5441512951783195653</id><published>2011-08-09T11:46:00.000-07:00</published><updated>2012-02-03T11:47:49.106-08:00</updated><title type='text'>Parsing In LWUIT &amp; LWUIT4IO</title><content type='html'>Generally LWUIT as a UI framework focuses on the visual aspect of things and not so much on the unsexy backend logic such as parsing. However, thanks to Ofir we now have an HTMLComponent that included within it a parser for XML which now has its own public API.&lt;br /&gt;&lt;br /&gt;Normally we would all try to reuse code from existing projects such as kXML etc. however due to licensing conflicts and the requirement to get permissions from management for every dependency we tend to just solve problems by writing code which is easier than going through the Sun/Oracle&amp;nbsp;bureaucracy.&lt;br /&gt;&lt;br /&gt;In LWUIT4IO I needed and subsequently wrote a JSON parser as well which allowed me to easily traverse results for queries to Google, Facebook and other API's. So now LWUIT includes two separate API's allowing you to parse server responses whether in XML or in JSON.&lt;br /&gt;&lt;br /&gt;Using both API's is rather simple and both API's include two versions: Parse Tree or Event based.&lt;br /&gt;The parse tree approach returns a data structure containing the parse data, for JSON this is a simple Hashtable with nested data structures. For XML this is an element node that can contain the whole XML hierarchy.&lt;br /&gt;&lt;br /&gt;The event based approach allows subclassing the parser and overriding key methods within it to store the data in the way you see fit.&lt;br /&gt;&lt;br /&gt;XML can be parsed by creating an instance of XMLParser and invoking the parse() method on that instance, which returns the root Element object for the XML tree. Alternatively the XMLParser class can be subclassed and the eventParser() method invoked, this will be followed by callbacks to the methods: startTag, endTag, attribute &amp;amp; textElement all of which can be overriden to provide custom behavior.&lt;br /&gt;&lt;br /&gt;The JSONParser class allows us to parse JSON data either by using the static parse method which provides callbacks to the JSONParseCallback interface thus providing events of the data within the JSON structure. It also contains an instance method named parse() that returns a Hashtable containing the resulting JSON structure, this structure is a set of nested Strings, Hashtables and Vectors to match the JSON JavaScript based hierarchy.&lt;br /&gt;&lt;br /&gt;You can take a look at the LWUIT4IO services package source code to see samples of how we use these parsers to implement several builtin services.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5441512951783195653?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5441512951783195653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/08/parsing-in-lwuit-lwuit4io.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5441512951783195653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5441512951783195653'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/08/parsing-in-lwuit-lwuit4io.html' title='Parsing In LWUIT &amp;amp; LWUIT4IO'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5444243039674165429</id><published>2011-08-01T03:29:00.000-07:00</published><updated>2012-02-03T11:47:49.110-08:00</updated><title type='text'>Drag And Drop Support In LWUIT</title><content type='html'>I recently committed support for a drag and drop API in LWUIT to simplify the task of implementing this functionality. LWUIT always allowed dragging and dropping which was a part of our demo for quite a while now, however we didn't have a convenient generic drag and drop API.&lt;br /&gt;&lt;br /&gt;Unlike other platforms who tried to create overly generic catch all API's I tried to make things as simple as possible. We always drag a component and always drop it onto another component, if something else is dragged to some other place it must be wrapped in a component, the logic of actually performing the operation indicated by the drop is the responsibility of the person implementing the drop.&lt;br /&gt;&lt;br /&gt;There is a minor sample of this in the LWUITDemo whose drag and drop behavior is now implemented using this API. However, the LWUITDemo relies on builtin drop behavior of container specifically designed for this purpose.&lt;br /&gt;&lt;br /&gt;To enable dragging a component it must be flagged as draggable using setDraggable(true), to allow dropping the component onto another component you must first enable the drop target with setDropTarget(true) and override some methods (more on that later).&lt;br /&gt;&lt;br /&gt;Notice that is a drop target is a container that has children, dropping a component on the child   will automatically find the right drop target. You don't have to make "everything" into a drop target.&lt;br /&gt;&lt;br /&gt;You can override these methods in the draggable components:&lt;br /&gt; getDragImage - this generates an image preview of the component that will be dragged. This automatically generates a sensible default so you don't need to override it.&lt;br /&gt; drawDraggedImage - this method will be invoked to draw the dragged image at a given location, it might be useful to override it if you want to display some drag related information such an additional icon based on location etc. (e.g. a move/copy icon).&lt;br /&gt;&lt;br /&gt;In the drop target you can override the following methods:&lt;br /&gt;draggingOver - returns true is a drop operation at this point is permitted. Otherwise releasing the component will have no effect.&lt;br /&gt;dragEnter/Exit - useful to track and cleanup state related to draging over a specific component.&lt;br /&gt;drop - the logic for dropping/moving the component must be implemented here!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Notice that Container.java has a simple sample drop implementation you can use to get started.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5444243039674165429?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5444243039674165429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/08/drag-and-drop-support-in-lwuit.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5444243039674165429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5444243039674165429'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/08/drag-and-drop-support-in-lwuit.html' title='Drag And Drop Support In LWUIT'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2687430292885903818</id><published>2011-07-27T09:28:00.000-07:00</published><updated>2012-02-03T11:47:48.970-08:00</updated><title type='text'>LWUIT VKB Localization</title><content type='html'>&lt;iframe width="640" height="390" src="http://www.youtube.com/embed/yukaBz0glzA" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;I just posted a new video showing how you can localize the LWUIT VKB, notice that this only applies to the LWUIT VKB in J2ME. For platforms that have native VKB's such as RIM &amp;amp; Android LWUIT will use the native keyboard by default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2687430292885903818?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2687430292885903818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/07/lwuit-vkb-localization.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2687430292885903818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2687430292885903818'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/07/lwuit-vkb-localization.html' title='LWUIT VKB Localization'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/yukaBz0glzA/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2420748743147965595</id><published>2011-07-26T00:36:00.000-07:00</published><updated>2012-02-03T11:47:48.954-08:00</updated><title type='text'>JavaOne 2011 Content Catalog Open: 7 LWUIT sessions/BoF's</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-yKb8t1F_amk/Ti5uR8agL5I/AAAAAAAAH2I/9jxBGjg0LwE/s1600/CIMG1207.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="150" src="http://4.bp.blogspot.com/-yKb8t1F_amk/Ti5uR8agL5I/AAAAAAAAH2I/9jxBGjg0LwE/s200/CIMG1207.JPG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;Searching through the J1 2011 &lt;a href="https://oracleus.wingateweb.com/scheduler/eventcatalog/eventCatalogJavaOne.do"&gt;content catalog for LWUIT&lt;/a&gt; produces 7 sessions and BoF's. Surprisingly I didn't even know about most of them and don't know the speakers in quite a few cases.&lt;br /&gt;The one you should probably attend is the one given by Chen and myself&amp;nbsp;24026 "What's New In LWUIT?". Other than that Ofir &amp;amp; Peter will talk about the LWUIT accessibility effort which is something I haven't talked about much in this blog. Its the effort to make LWUIT usable for people with disabilities ranging from color blindness, blurry vision to blindness etc. Both Peter &amp;amp; Ofir are very&amp;nbsp;engaging speakers and I was personally able to learn quite allot from this important humane effort.&lt;br /&gt;&lt;br /&gt;I also have a BoF which I will be presenting with &lt;a href="http://lwuit.blogspot.com/2011/06/martin-is-on-fire-new-lwuit-tipster.html"&gt;Martin our graphics designer&lt;/a&gt; (first time for J1, hell I think this is the first time a designer took the stage at J1), titled&amp;nbsp;Graphics Designer Secrets for Compelling Mobile User Interfaces (20340). In this BoF we will try to bridge the developer-graphics designer gap by showing you how the dynamics and technicalities of the back and forth process between the designer and the developer can become a fertile grounds for innovative UI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2420748743147965595?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2420748743147965595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/07/javaone-2011-content-catalog-open-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2420748743147965595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2420748743147965595'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/07/javaone-2011-content-catalog-open-7.html' title='JavaOne 2011 Content Catalog Open: 7 LWUIT sessions/BoF&amp;#39;s'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-yKb8t1F_amk/Ti5uR8agL5I/AAAAAAAAH2I/9jxBGjg0LwE/s72-c/CIMG1207.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-786546141716153652</id><published>2011-07-21T04:45:00.000-07:00</published><updated>2012-02-03T11:47:49.201-08:00</updated><title type='text'>Toggle Buttons &amp; Grouping Them Together</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-t8t2_ZEqliI/TigHVYVj19I/AAAAAAAAH08/SW-40ifzlLk/s1600/toggle_buttons.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-t8t2_ZEqliI/TigHVYVj19I/AAAAAAAAH08/SW-40ifzlLk/s1600/toggle_buttons.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Historically LWUIT never had toggle buttons mostly because we just never got around to implement them. This situation couldn't go on for long and a while back we added toggle buttons although not quite in the way we thought we would.&lt;br /&gt;&lt;br /&gt;A toggle button is a button that is pressed and then stays pressed, when pressed again its released. Hence the button has a selected state to indicate if its pressed or not. Just like the radio button &amp;amp; checkbox components in LWUIT. So LWUIT's new toggle buttons are really any button (checkbox &amp;amp; radio buttons derive from Button) that has the setToggle() method invoked with true. It thus paints itself with the toggle button style unless explicitly defined otherwise (note that the UIID will be implicitly changed to "ToggleButton").&lt;br /&gt;&lt;br /&gt;The cool thing about this is that you can effectively take your knowledge about checkboxes &amp;amp; radio buttons and apply it to toggle buttons.&lt;br /&gt;&lt;br /&gt;That's half the story though, to get the full effect of some cool toggle button UI's we would like to assign the buttons on the edges with a rounded feel like some platforms choose to do... That's pretty easy, you can just assign a different UIID to the first/last buttons and be over with it.&lt;br /&gt;&lt;br /&gt;But what if you want your code to be generic? After all you might add/remove a button in runtime based on application state and you would like it to have the right style.&lt;br /&gt;&lt;br /&gt;To solve this we introduced the ComponentGroup.&lt;br /&gt;&lt;br /&gt;The ComponentGroup is a special container that can be either horizontal or vertical (Box X or Y&amp;nbsp;respectively), it also does nothing else. You need to explicitly activate it in the theme by setting a theme property to true (by default you need to set ComponentGroupBool to true).&lt;br /&gt;&lt;br /&gt;When&amp;nbsp;ComponentGroupBool is set to true the component group will modify the styles of all components placed within it to match the element UIID given to it (by default&amp;nbsp;GroupElement) with special caveats to the first/last/only elements. E.g.&lt;br /&gt;1. If I have one element within a component group it will have the UIID:&amp;nbsp;GroupElementOnly&lt;br /&gt;2. If I have two elements within a component group they will have the UIID's&amp;nbsp;GroupElementFirst,&amp;nbsp;GroupElementLast&lt;br /&gt;3. If I have three elements within a component group they will have the UIID's&amp;nbsp;GroupElementFirst, GroupElement, GroupElementLast&lt;br /&gt;4. If I have four elements within a component group they will have the UIID's&amp;nbsp;GroupElementFirst,&amp;nbsp;GroupElement,&amp;nbsp;GroupElement,&amp;nbsp;GroupElementLast&lt;br /&gt;&lt;br /&gt;You get the picture... This allows you to define special styles for the sides (don't forget to use the derive attribute to generalize your theme) and provide toggle buttons that include special effects simply by placing them into this group.&lt;br /&gt;You can customize the UIID set by the component group by calling setElementUIID in the component group e.g.&amp;nbsp;setElementUIID("ToggleButton") for the picture above will result in:&lt;br /&gt;ToggleButtonFirst,&amp;nbsp;ToggleButton,&amp;nbsp;ToggleButtonLast&lt;br /&gt;&lt;br /&gt;There is a sample of this in the SVN version of the LWUITDemo within the fonts demo. This is a short snippet from there:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="background-color: white; color: #cccccc; font-style: normal;"&gt; 1: &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt; 2: &lt;/span&gt;ComponentGroup buttons &lt;span style="color: blue;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; ComponentGroup&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt; 3: &lt;/span&gt;buttons&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;setElementUIID&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;"ToggleButton"&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt; 4: &lt;/span&gt;buttons&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;setHorizontal&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;true&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #cccccc; font-style: normal;"&gt; 5: &lt;/span&gt;RadioButton plain &lt;span style="color: blue;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; RadioButton&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;"Plain"&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt; 6: &lt;/span&gt;RadioButton underline &lt;span style="color: blue;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; RadioButton&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;"Underline"&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt; 7: &lt;/span&gt;RadioButton strikeout &lt;span style="color: blue;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; RadioButton&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: purple;"&gt;"Strikethru"&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt; 8: &lt;/span&gt;ButtonGroup bg &lt;span style="color: blue;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; ButtonGroup&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt; 9: &lt;/span&gt;initRb&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;bg&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; buttons&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; listener&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; plain&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #cccccc; font-style: normal;"&gt;10: &lt;/span&gt;initRb&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;bg&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; buttons&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; listener&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; underline&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;11: &lt;/span&gt;initRb&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;bg&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; buttons&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; listener&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; strikeout&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;12: &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;13: &lt;/span&gt;Container centerFlow &lt;span style="color: blue;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; Container&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/span&gt; FlowLayout&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;Component&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;CENTER&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;14: &lt;/span&gt;f&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;addComponent&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;centerFlow&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #cccccc; font-style: normal;"&gt;15: &lt;/span&gt;centerFlow&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;addComponent&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;buttons&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;16: &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;17: &lt;/span&gt;&lt;span style="color: red;"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/span&gt; &lt;span style="color: red;"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/span&gt; initRb&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;ButtonGroup bg&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; Container buttons&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; ActionListener listener&lt;span style="color: blue;"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/span&gt; RadioButton rb&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: blue;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;18: &lt;/span&gt;   bg&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;add&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;rb&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;19: &lt;/span&gt;   rb&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;setToggle&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;true&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #cccccc; font-style: normal;"&gt;20: &lt;/span&gt;   buttons&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;addComponent&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;rb&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;21: &lt;/span&gt;   rb&lt;span style="color: blue;"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;addActionListener&lt;span style="color: blue;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;listener&lt;span style="color: blue;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; color: #eeeeee; font-style: normal;"&gt;22: &lt;/span&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-786546141716153652?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/786546141716153652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/07/toggle-buttons-grouping-them-together.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/786546141716153652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/786546141716153652'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/07/toggle-buttons-grouping-them-together.html' title='Toggle Buttons &amp;amp; Grouping Them Together'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-t8t2_ZEqliI/TigHVYVj19I/AAAAAAAAH08/SW-40ifzlLk/s72-c/toggle_buttons.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3950149146724566873</id><published>2011-07-13T04:52:00.000-07:00</published><updated>2012-02-03T11:47:49.051-08:00</updated><title type='text'>Keep It In Focus</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://southparkstudios-intl.mtvnimages.com/shared/sps/images/shows/southpark/vertical_video/import/season_01/sp_0109_15_v6.jpg?width=480" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="240" src="http://southparkstudios-intl.mtvnimages.com/shared/sps/images/shows/southpark/vertical_video/import/season_01/sp_0109_15_v6.jpg?width=480" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;I rewrote the focus behavior in LWUIT yet again, this is the fifth time so far and I am weary of doing it yet again. We all have these "don't want to touch that" areas of the code, which we avoid like the plague and in LWUIT it was always the focus handling so I gritted my teeth and decided: it can break my compatibility but it will never take the freedom of the code.&lt;br /&gt;&lt;br /&gt;I maybe a bit&amp;nbsp;melodramatic&amp;nbsp;here but focus was a nightmare in LWUIT, the main issue is the complex edge cases where a component becomes unreachable via focus. Normally we would say: just call setNextFocusLeft/Right/Up/Down.&lt;br /&gt;However this doesn't work for the HTML component and worse, its not always obvious.&lt;br /&gt;E.g. a specific device with a specific font size/DPI ratio might have a layout that looks different enough for focus to fail on that device and not on another (this actually happened in some of the previous focus implementations).&lt;br /&gt;&lt;br /&gt;Eventually after so many focus failures I broke down and wrote the focus vector code where I guarantee every component will receive focus.&lt;br /&gt;&lt;br /&gt;So what made me regret that?&lt;br /&gt;The focus is really unintuitive for standard applications and even for HTMLComponent, it jumps around (to satisfy the requirement of visiting everything) and generally doesn't make much sense. However, the thing that triggered a complete rewrite was a benchmark which we failed (more on that in a future post).&lt;br /&gt;&lt;br /&gt;Anyway what does this means to you?&lt;br /&gt;You need to test your code with the new LWUIT and make sure your components are reachable, if not you need to use the component methods of setNextFocusUp/Down/Left/Right to define the focus order as you need it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3950149146724566873?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3950149146724566873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/07/keep-it-in-focus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3950149146724566873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3950149146724566873'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/07/keep-it-in-focus.html' title='Keep It In Focus'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-8456295090193955252</id><published>2011-07-11T00:44:00.000-07:00</published><updated>2012-02-03T11:47:49.218-08:00</updated><title type='text'>Shrink Those Resources</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-TL_CaySlcOY/Tey4kgwdGFI/AAAAAAAAHpw/vHtMGH0Sy74/s1600/t-zone-demo.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-TL_CaySlcOY/Tey4kgwdGFI/AAAAAAAAHpw/vHtMGH0Sy74/s400/t-zone-demo.jpg" width="252" /&gt;&lt;/a&gt;&lt;/div&gt;I made the t-zone/tipster demo in one day (each... I spent most of the time on the logic), they were really easy to make (once Martin made the PSD's) but when you rush you miss on many "details" such as size. I must admit I was quite negligent letting the t-zone resource file&amp;nbsp;balloon&amp;nbsp;to over 900kb in size and the tipster theme was close to 300kb!&lt;br /&gt;Its easy to lose track of size/performance when you are working within the comforts of a visual tool like the resource editor even if you are the guy who wrote the resource editor...&lt;br /&gt;&lt;br /&gt;I suddenly noticed this issue when running on an S40 device (which has a 1mb jar size limit) and so I reduced both resources almost in half without reducing functionality!&lt;br /&gt;&lt;br /&gt;When optimizing resource files you need to keep in mind one thing: its all about image sizes.&lt;br /&gt;Images will take up 95-99% of the resource file size, everything else is peanuts in comparison.&lt;br /&gt;&lt;br /&gt;Like every optimization the first rule is to reduce the size of the biggest images which will provide your biggest improvements, for this purpose I introduced the ability to see image sizes in KB (see the menu option Images -&amp;gt; Image Sizes (KB).&lt;br /&gt;This produces a list of images sorted by size with the amount of KB each takes. For the t-zone theme the Sun, the moon &amp;amp; Martin were the largest images (which kind of made me think of Game Of Thrones). Turns out these images were all multi-images that I used the wizard to make &amp;amp; in them by mistake I allowed the creation of all multi-image resolution including Very High and HD resolutions. These very high resolution images take up ALLOT of space! Just going to the multi-images, selecting the unnecessary resolutions &amp;amp; deleting these HUGE images (note you can see the size in KB at the top right side in the image viewer) saved a HUGE amount of space!&lt;br /&gt;&lt;br /&gt;Next most should probably use the "Delete Unused Images" menu option as well (its also under the Images menu) in my case it detects allot of images used programmatically and didn't help much (it also seems to have a regression in failing to detect usage of timeline images).&lt;br /&gt;&lt;br /&gt;If you have a very large image that is opaque you might want to consider converting it to JPEG and replacing the builtin PNG, JPEG's work on most devices and are much smaller. I did this with the LWUIT demo to reduce size but not with the t-zone theme.&lt;br /&gt;&lt;br /&gt;Last but not least I added a new feature to the resource editor where you can use the excellent OptiPng tool to optimize image files right from the resource editor. To use this feature you need to install &lt;a href="http://optipng.sourceforge.net/"&gt;OptiPng&lt;/a&gt;&amp;nbsp;then select "Images -&amp;gt; Launch OptiPng" from the menu. Once you do that the tool will automatically optimize all your PNG's, this didn't help much with the LWUIT Demo images but made a huge difference for both t-zone &amp;amp; tipster themes!&lt;br /&gt;&lt;br /&gt;The t-zone theme went down to 412kb before compression (from well over 900kb!) and 376,765 compressed bytes!!! The obfuscated JAR which was well over 1.1mb is now 580kb! (594,705 bytes). The icon is 11,233 bytes which means the application logic, MIDlet and LWUIT sum up to 206,707 bytes &amp;nbsp;a reasonable 201kb for an entirely visual environment.&lt;br /&gt;&lt;br /&gt;When faced with size issues make sure to check the size of your res file, if your JAR file is large open it with a tool such as 7-zip and sort elements by size. Start reviewing which elements justify the size overhead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-8456295090193955252?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/8456295090193955252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/07/shrink-those-resources.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8456295090193955252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8456295090193955252'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/07/shrink-those-resources.html' title='Shrink Those Resources'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-TL_CaySlcOY/Tey4kgwdGFI/AAAAAAAAHpw/vHtMGH0Sy74/s72-c/t-zone-demo.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4977990040803609646</id><published>2011-07-02T23:57:00.000-07:00</published><updated>2012-02-03T11:47:49.091-08:00</updated><title type='text'>Preview Of The New LWUIT Demo</title><content type='html'>&lt;script src="http://www.java.com/js/deployJava.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script&gt;    var attributes = {codebase:'http://java.net/projects/lwuit/sources/svn/content/trunk/www/demoApplet',                      code:'com.sun.lwuit.uidemo.LWUITApplet.class',                      archive:'LWUITDemoOneJar.jar',                      width:480, height:800} ;    var parameters = {fontSize:16} ;    var version = '1.6' ;    deployJava.runApplet(attributes, parameters, version);&lt;/script&gt;&lt;br /&gt;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.&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;Check out several of the demo features&amp;nbsp;specifically:&lt;br /&gt;1. The animation demo was rewritten to better represent our view of what constitutes an animation.&lt;br /&gt;2. The layouts demo now animates nicely between layouts (highly&amp;nbsp;addictive)&lt;br /&gt;3. The Scrolling demo transitions nicely between list types (grid/horizontal/vertical) even when you are in the middle of scrolling...&lt;br /&gt;4. The fonts demo allows manipulating text decorations and shows off toggle buttons.&lt;br /&gt;&lt;br /&gt;There are obviously new themes and allot more going on under the hood which we can't really go into right now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4977990040803609646?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4977990040803609646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/07/preview-of-new-lwuit-demo.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4977990040803609646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4977990040803609646'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/07/preview-of-new-lwuit-demo.html' title='Preview Of The New LWUIT Demo'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2601156799179664829</id><published>2011-06-29T07:19:00.000-07:00</published><updated>2012-02-03T11:47:48.967-08:00</updated><title type='text'>FYI: Swimming Servers</title><content type='html'>It seems the java.net servers are in the process of taking a swimming lesson at their data center, hopefully they are wearing their floating devices... The center is flooded and java.net itself is down.&lt;br /&gt;&lt;br /&gt;Anyway the forum/svn/website/issue tracker etc. are all down for now with no definite ETA, if this continues for too long we will try to setup a contingency plan for an alternate website to host all of the material (source/resource editor etc.). For now you can use &lt;a href="http://stackoverflow.com/"&gt;stackoverflow.com&lt;/a&gt; for support (make sure to tag your questions as lwuit) as well as this blog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2601156799179664829?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2601156799179664829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/06/fyi-swimming-servers.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2601156799179664829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2601156799179664829'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/06/fyi-swimming-servers.html' title='FYI: Swimming Servers'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1320335624979688238</id><published>2011-06-20T04:10:00.000-07:00</published><updated>2012-02-03T11:47:48.899-08:00</updated><title type='text'>Dropping Support For RIM JDE 4.7</title><content type='html'>Don't panic we still support devices all the way back to JDE 4.2, however 4.7 was a special case. RIM created version 4.7 for the initial Storm device and added touch support there in an incompatible way (which is why we have a separate build for that platform). A few years ago RIM issued an update for Storm and moved all of the 4.7 users to 5.0 OS.&lt;br /&gt;So if you are using a blackberry device you either have a non-touch device that might still be using OS 4.6 or older or you might have a touch device which is probably using 5.0 or newer. So 4.7 is redundant except for the fact that up until now it was our recommended JDE platform for touch devices.&lt;br /&gt;This version of the JDE will no longer work with the touch port and you will need the 5.0 JDE going forward, this will allow us to use some of the new API's available in 5.0 when targeting newer devices and still keep support for older none-touch devices.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1320335624979688238?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1320335624979688238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/06/dropping-support-for-rim-jde-47.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1320335624979688238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1320335624979688238'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/06/dropping-support-for-rim-jde-47.html' title='Dropping Support For RIM JDE 4.7'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2593603564791480247</id><published>2011-06-15T06:15:00.000-07:00</published><updated>2012-02-03T11:47:48.964-08:00</updated><title type='text'>LWUIT's New Layout Animation Facility</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="390" src="http://www.youtube.com/embed/Sjn_dtUfQpw" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;I'd like to create some more demo animations and some additional animation utilities like this one and I probably will as soon as I get some time.&lt;br /&gt;&lt;br /&gt;While the animations in this video might seem elaborate, they are really simple to achieve and work great even on feature phones. All that is really needed is one LWUIT method: Container.animateLayout(int)&lt;br /&gt;&lt;br /&gt;To understand this I'll just explain a couple of things about LWUIT components, when we add a component to a container its generally just added but not positioned anywhere. A novice might notice the setX/Y/Width/Height methods on a component and just try to position it absolutely.&lt;br /&gt;This won't work since these methods are meant for the layout manager which it implicitly invoked when a form is shown (internally in LWUIT) and the layout manager uses these methods to position the components as it sees fit.&lt;br /&gt;However, if you add components to LWUIT on your own it is your responsibility to invoke revalidate (or layoutContainer) to arrange the newly added components. LWUIT doesn't "reflow" implicitly since that would be hugely expensive, imagine doing the layout calculations for every component added to the container the cost would be closer to a factorial of the original cost of adding a component.&lt;br /&gt;&lt;br /&gt;The animateLayout() is simply a fancy form of revalidate. After changing the layout when you invoke this method it will animation the components to their new sizes and positions seamlessly.&lt;br /&gt;&lt;br /&gt;The first example in the tipster demo shows an "interlace" effect where the components each slide from a separate direction into the screen. &amp;nbsp;This is the code I used before showing the form:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; f.revalidate();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int iter = 0 ; iter &amp;lt; c.getComponentCount() ; iter++) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Component current = c.getComponentAt(iter);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(iter % 2 == 0) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; current.setX(-current.getWidth());&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; current.setX(current.getWidth());&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.setShouldCalcPreferredSize(true);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.animateLayout(1000);&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lets go over this line by line:&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; f.revalidate();&lt;/div&gt;&lt;/div&gt;&lt;div&gt;I make sure the layout is valid so I can start from the correct component positions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(iter % 2 == 0) {&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; current.setX(-current.getWidth());&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; current.setX(current.getWidth());&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;/div&gt;&lt;div&gt;I manually position every component outside of the screen, if they are odd I place them to the right and if they are even I place them to the left.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.setShouldCalcPreferredSize(true);&lt;/div&gt;&lt;div&gt;I mark the UI as needing layout. This is crucial since I validated the UI earlier (by calling revalidate). Changing the X/Y/Width/Height doesn't trigger a validation! LWUIT doesn't know I made that change!&lt;/div&gt;&lt;div&gt;By calling&amp;nbsp;setShouldCalcPreferredSize I'm explicitly telling LWUIT that I changed something in the UI and I want it to validate, normally this method is implicitly invoked by LWUIT.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.animateLayout(1000);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Perform the animation over the length of a second, this might seem like much but the animation starts before the form entry transition so it isn't that much.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The other animations are even simpler than this one and all follow the same basic rules, place the components&amp;nbsp;wherever&amp;nbsp;you want either manually (or by changing the layout) and use animateLayout() to automatically rearrange them to the new position.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;BTW we fully intended to have a new LWUIT release by now but its getting delayed due to the typical&amp;nbsp;bureaucratic&amp;nbsp;nonsense that is an unavoidable reality within a large corporation. We&amp;nbsp;apologize it is taking so long and even more so that we do not have an ETA. Those of you following the SVN know we already have everything ready for 1.5.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2593603564791480247?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2593603564791480247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/06/lwuit-new-layout-animation-facility.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2593603564791480247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2593603564791480247'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/06/lwuit-new-layout-animation-facility.html' title='LWUIT&amp;#39;s New Layout Animation Facility'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/Sjn_dtUfQpw/default.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3980487303080477013</id><published>2011-06-09T02:28:00.000-07:00</published><updated>2012-02-03T11:47:49.055-08:00</updated><title type='text'>Interesting Couple Of Weeks</title><content type='html'>This post isn't about LWUIT, its about Java on the desktop and its current direction. Microsoft just introduced &lt;a href="http://www.youtube.com/watch?v=p92QfWOw88I"&gt;Windows 8&lt;/a&gt;,&amp;nbsp;for those of you who haven't been following here is the gist:&lt;br /&gt;Run's on Arm (as well as Intel obviously), Completely new touch/gesture based UI, less emphasis on Windows.&lt;br /&gt;&lt;br /&gt;Apple also introduced Tiger (next Mac OS X), which also focuses more on full screen applications as well as eliminates the scrollbar... Mac OS X will now scroll like the iPhone and hide the scrollbar when it isn't used.&lt;br /&gt;Rumors are also abundant about Apple's laptop line moving to Arm chips which they can easily do since they have a fat binary .app directory structure (which MS doesn't have).&lt;br /&gt;&lt;br /&gt;To me these things signal a massive UI&amp;nbsp;convergence trend where the mobile UI takes the lead. Up until now mobile UI's were influenced by desktop paradigms and now we finally see the reverse coming on in full force.&lt;br /&gt;&lt;br /&gt;Where does this leave Java developers?&lt;br /&gt;&lt;br /&gt;Swing hasn't been moving forward for quite a while now &amp;amp; Java FX isn't even in production and already it seems behind the curve on these sort of features. I'd love to say that LWUIT can take over but right now we still don't have many of the features necessary to write full scale desktop apps...&lt;br /&gt;However, I would say that this is a great time to be a mobile developer since an&amp;nbsp;upheaval is on its way and it seems that we are leading the pack.&lt;br /&gt;&lt;br /&gt;This sort of&amp;nbsp;convergence&amp;nbsp;also means a huge migration to the cloud, when using multiple mobile devices its just impossible to sync them in any other way. Even those&amp;nbsp;reluctant about privacy and security would probably shift to the cloud to remain competitive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3980487303080477013?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3980487303080477013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/06/interesting-couple-of-weeks.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3980487303080477013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3980487303080477013'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/06/interesting-couple-of-weeks.html' title='Interesting Couple Of Weeks'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-7683970459066103353</id><published>2011-06-06T09:01:00.000-07:00</published><updated>2012-02-03T11:47:49.197-08:00</updated><title type='text'>LWUIT Timeline Tutorial Video Part One</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="390" src="http://www.youtube.com/embed/9q5y00WxV30" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;This one required tremendous amounts of work to make and I still didn't finish. Since its quite a long video I have some doubts on whether people will have the energy to watch it all the way through and follow up to part two.&lt;br /&gt;This actually goes most of the way in creating the theme for the t-zone demo (which is now in the LWUIT SVN), if I do the second part it will continue from where I left off all the way to creating the actual code backing this.&lt;br /&gt;&lt;br /&gt;BTW I uploaded a new binary of the resource editor today, this new version includes theme templates based both on this theme and on the Tipster demo theme. Check them out and please improve your UI designs accordingly ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-7683970459066103353?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/7683970459066103353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/06/lwuit-timeline-tutorial-video-part-one.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7683970459066103353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7683970459066103353'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/06/lwuit-timeline-tutorial-video-part-one.html' title='LWUIT Timeline Tutorial Video Part One'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/9q5y00WxV30/default.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4350810815119873502</id><published>2011-06-01T05:44:00.000-07:00</published><updated>2012-02-03T11:47:49.070-08:00</updated><title type='text'>Martin Is On Fire: New LWUIT Tipster Demo</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="390" src="http://www.youtube.com/embed/s2X0h95cFDc" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;Martin (our designer) has finally come through with two professionally designed demos in a row, showing off the difference a proper designer makes when building such applications. He cranked the designs for these ridiculously fast and once I had the designs in place it reduced allot of the doubt of designing. Overall I got the design yesterday morning and now the video is on youtube... I will commit the code to SVN in a few hours (hopefully). &lt;br /&gt;I already committed the code for Martin's previous t-zone demo which I've been showing around a bit and getting allot of surprised reactions from people. It just goes to show you how far the effect of a good UI designer can take your UI regardless of the technology you are using.&lt;br /&gt;&lt;br /&gt;We are trying to get a release up to speed so I don't have the time to do the tutorials but I would like to get detailed step by step "how to" tutorials explaining exactly how I implemented both applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4350810815119873502?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4350810815119873502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/06/martin-is-on-fire-new-lwuit-tipster.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4350810815119873502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4350810815119873502'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/06/martin-is-on-fire-new-lwuit-tipster.html' title='Martin Is On Fire: New LWUIT Tipster Demo'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/s2X0h95cFDc/default.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3001278390095302520</id><published>2011-05-29T14:45:00.000-07:00</published><updated>2012-02-03T11:47:49.003-08:00</updated><title type='text'>Preview Of The New LWUIT Friends t-Zone Demo</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="510" src="http://www.youtube.com/embed/wUNUEYCq_Ek" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;This demo is coming soon, full source code and everything. It doesn't really have much source code since the whole thing was created in the GUI builder with very little code. I hope to also create a tutorial showing off exactly how this demo was made.&lt;br /&gt;BTW If you have a stack overflow account please go to this &lt;a href="http://stackoverflow.com/questions/6152237/what-is-lwuit-light-weight-user-interface-toolkit/6165904#6165904"&gt;question&lt;/a&gt; and vote up my answer, its amazing how the worst possible LWUIT screenshots could be picked off this blog... Frankly its also a bit of my fault since finding proper screenshots of newer applications (not videos) is a bit hard. I should get on to that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3001278390095302520?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3001278390095302520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/05/preview-of-new-lwuit-friends-t-zone.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3001278390095302520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3001278390095302520'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/05/preview-of-new-lwuit-friends-t-zone.html' title='Preview Of The New LWUIT Friends t-Zone Demo'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/wUNUEYCq_Ek/default.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2586623789156432085</id><published>2011-05-25T06:11:00.000-07:00</published><updated>2012-02-03T11:47:48.957-08:00</updated><title type='text'>Clicking Within A Cell Renderer</title><content type='html'>One of the things people looked for quite often in Lists was the ability to click on a specific element within a ListCellRenderer to get an event specific to that element. E.g. a list with X's drawn on the side to remove the element.&lt;br /&gt;In the past we contended that since the list is stateless its impossible for us to provide such information and recommended people use a Container with items. We now have a solution which works only for touch devices, this feature allows adding a listener to a component within the renderer which will now trigger an event if the component is touched.&lt;br /&gt;Notice that the component will not contain the right data since the list selection indicates the actual selection, however if you add a listener to a button containing the X you should get an action event on that button before the list action event. This will allow you to toggle a flag indicating that the X was pressed and not a different portion of the renderer.&lt;br /&gt;This isn't ideal but since the list is stateless this is the best we could come up with.&lt;br /&gt;&lt;br /&gt;Assuming you used the GUI builder &amp;amp; GenericListCellRenderer you can use the method GenericListCellRenderer.extractLastClickedComponent() in the action listener for the list to get the button that was pressed to generate this event or null if no button was pressed.&lt;br /&gt;&lt;br /&gt;I apologize for the lack of videos recently, we are working very hard towards a LWUIT release in June (hopefully, bureaucracy is always our foe) so I don't have quite the same amount of cycles to dedicate for proper blogging. I'll try to get something decent going soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2586623789156432085?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2586623789156432085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/05/clicking-within-cell-renderer.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2586623789156432085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2586623789156432085'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/05/clicking-within-cell-renderer.html' title='Clicking Within A Cell Renderer'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-8119838087448466425</id><published>2011-05-18T04:48:00.000-07:00</published><updated>2012-02-03T11:47:49.210-08:00</updated><title type='text'>Logging &amp; Caching In LWUIT4IO</title><content type='html'>We've been quite busy with holidays and Chen going off to JavaOne in India so I didn't have as much time to blog as I normally do or prepare the videos I should be working on. Hopefully I'll recover some time soon and be able to get back to my normal pace.&lt;br /&gt;In recent LWUIT SVN's I deprecated and effectively removed the venerable log class. The main motivation behind that is the fact that logging didn't go through the platform code and never made sense in LWUIT. It was hardcoded for MIDP and had many issues. &lt;br /&gt;&lt;br /&gt;That class is replaced by an almost identical class within LWUIT4IO which has similar functionality with a few cool new features. First, it can run on all platforms including Java SE, RIM, MIDP and even Thorsten's new Android port of LWUIT4IO.&lt;br /&gt;Then it has one more "killer feature", it can track file IO seamlessly!&lt;br /&gt;&lt;br /&gt;Unlike J2SE, most mobile platforms are really sensitive regarding forgotten streams and its essential to close every stream you open. The problem is that its often really hard to keep track in a large application that deals with many dynamic files constantly. However, since all LWUIT4IO streams are buffered it can easily tell when a stream is opened/closed or double closed. This gets logged automatically if you invoke Log.getInstance().trackFileSystem() which will cause entries to appear in your log containing the URL opened/closed and the number of open streams. This feature helped me in tracking some pretty hairy bugs.&lt;br /&gt;&lt;br /&gt;Another feature in LWUIT4IO to which I didn't give enough spotlight is the cache map, its effectively a lean hashtable which stores its data using weak/soft references (depending on the platform) and falls back to storage when not enough memory is available. Its a great way to cache data without going overboard.&lt;br /&gt;One of the cool things about it is the fact that we use it seamlessly for our storage abstraction (which hides RMS or equivalent services) in effect providing faster access to RMS storage which is often slow on devices.&lt;br /&gt;&lt;br /&gt;While writing on that subject it dawned on me that I never blogged about our "seamless" serialization support in LWUIT4IO. The Storage class and util class contain methods for reading/writing of objects. All the basic JavaME data types should be supported including: primitive arrays, Strings, Object arrays, Hashtable's and vectors. Arbitrary objects can be stored by implementing com.sun.lwuit.io.Externalizable. This allows easy/efficient persistence and networking between applications.&lt;br /&gt;Give these features a try and let us know how they work for you.&lt;br /&gt;&lt;br /&gt;As a side note: due to recent issues with the forum/mailing list that unfortunately remain unresolved to this moment I decided to start answering issues in stack overflow which has a great &lt;a href="http://stackoverflow.com/questions/tagged/lwuit"&gt;LWUIT section&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-8119838087448466425?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/8119838087448466425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/05/logging-caching-in-lwuit4io.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8119838087448466425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8119838087448466425'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/05/logging-caching-in-lwuit4io.html' title='Logging &amp;amp; Caching In LWUIT4IO'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-369525351744173803</id><published>2011-05-07T21:25:00.000-07:00</published><updated>2012-02-03T11:47:49.038-08:00</updated><title type='text'>Terrences Cool Meet Me For Dinner Demo</title><content type='html'>&lt;iframe width="480" height="390" src="http://www.youtube.com/embed/_AoQmQzRZXg" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Terrence has just released the sources for his cool "&lt;a href="http://terrencebarr.wordpress.com/2011/05/06/beyond-smartphones-source-code-video-released/"&gt;Meet Me For Dinner&lt;/a&gt;" JavaOne demo. The demo shows off some pretty cool effects and social web/location interaction.&lt;br /&gt;Check out his &lt;a href="http://terrencebarr.wordpress.com/2011/05/06/beyond-smartphones-source-code-video-released/"&gt;post&lt;/a&gt; for more information.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-369525351744173803?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/369525351744173803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/05/terrences-cool-meet-me-for-dinner-demo.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/369525351744173803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/369525351744173803'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/05/terrences-cool-meet-me-for-dinner-demo.html' title='Terrences Cool Meet Me For Dinner Demo'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/_AoQmQzRZXg/default.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-9201132163996835982</id><published>2011-05-04T04:19:00.000-07:00</published><updated>2012-02-03T11:47:49.256-08:00</updated><title type='text'>Play It Again LWUIT</title><content type='html'>The next version of LWUIT will completely replace the way to interact with media and supersede it with our own API's. When we initially introduced LWUIT's MediaComponent, MIDP was the major target for LWUIT and blackberry support was on top of MIDP.&lt;br /&gt;Since then we had Thorsten porting LWUIT to RIM/Android and introduced ports to TV, Java SE etc. MMAPI isn't available on all of those platforms.&lt;br /&gt;&lt;br /&gt;This called for a rethinking of our approach to media and so we introduced VideoComponent which uses the &lt;a href="http://lwuit.blogspot.com/2010/09/peer-into-future-of-lwuit.html"&gt;peer component&lt;/a&gt; architecture to embed a video into LWUIT. Unlike the older MediaComponent code there is no need for MMAPI know how or any information on the underlying playback. Just use a URL or stream+mime type to playback any video file.&lt;br /&gt;&lt;br /&gt;Audio is integrated even deeper right into the Display class with methods to create an audio stream and play it. The main feature here is automatic resource cleanup which is a frequent problem with audio files (neglecting to close an audio resource properly is a big portability issue). LWUIT automatically closes resources as necessary in a way that is completely seamless for the developer, again with no need to know anything about MMAPI or the platform native implementation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-9201132163996835982?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/9201132163996835982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/05/play-it-again-lwuit.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9201132163996835982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9201132163996835982'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/05/play-it-again-lwuit.html' title='Play It Again LWUIT'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-6974858515354531465</id><published>2011-04-26T06:50:00.000-07:00</published><updated>2012-02-03T11:47:49.167-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT Resource Editor Tutorial JavaME J2ME MIDP Android Blackberry RIM'/><title type='text'>Generating A Netbeans Project From The Resource Editor</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="390" src="http://www.youtube.com/embed/HOfb8qiySd8" title="YouTube video player" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;I already had a similar tutorial in the past but this one is more refined and concise (thanks to &lt;a href="http://www.screencast-o-matic.com/"&gt;http://www.screencast-o-matic.com/&lt;/a&gt;). This is a simple developer oriented tutorial showing how simple it is to create a hello world application directly to Netbeans and reviewing the output you get as a result.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-6974858515354531465?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/6974858515354531465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/04/generating-netbeans-project-from.html#comment-form' title='30 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6974858515354531465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6974858515354531465'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/04/generating-netbeans-project-from.html' title='Generating A Netbeans Project From The Resource Editor'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/HOfb8qiySd8/default.jpg' height='72' width='72'/><thr:total>30</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-9028905413246638975</id><published>2011-04-20T07:26:00.000-07:00</published><updated>2012-02-03T11:47:49.235-08:00</updated><title type='text'>Mini Tutorial On Editing a Theme Attribute</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="390" src="http://www.youtube.com/embed/TKXcVf7zJDg" title="YouTube video player" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;Theme attributes and UIID's are some of the more challenging aspects of creating a theme. In this tutorial we try to break down the elements that can be customized for every component within the theme dialog.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-9028905413246638975?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/9028905413246638975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/04/mini-tutorial-on-editing-theme.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9028905413246638975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9028905413246638975'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/04/mini-tutorial-on-editing-theme.html' title='Mini Tutorial On Editing a Theme Attribute'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/TKXcVf7zJDg/default.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1406534310705975846</id><published>2011-04-19T21:31:00.000-07:00</published><updated>2012-02-03T11:47:48.909-08:00</updated><title type='text'>Oracle Magazine Cover Article About JavaME</title><content type='html'>Talks quite a bit about LWUIT including interview with Telmap, read it &lt;a href="http://www.oracle.com/technetwork/issue-archive/2011/11-mar/o21javame-310980.html"&gt;here&lt;/a&gt;. Via &lt;a href="http://terrencebarr.wordpress.com/2011/04/19/oracle-magazine-billions-served/"&gt;Terrence&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1406534310705975846?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1406534310705975846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/04/oracle-magazine-cover-article-about.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1406534310705975846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1406534310705975846'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/04/oracle-magazine-cover-article-about.html' title='Oracle Magazine Cover Article About JavaME'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1378596304160000262</id><published>2011-04-13T06:59:00.000-07:00</published><updated>2012-02-03T11:47:48.906-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT ContainerList'/><title type='text'>Contain That List - Bringing Containers &amp; List's Together</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="510" src="http://www.youtube.com/embed/QqnhKjxGmK4" title="YouTube video player" width="853"&gt;&lt;/iframe&gt;&lt;br /&gt;LWUIT's List's are a unique component in their adherence to the Swing concepts of MVC (&lt;a href="http://lwuit.blogspot.com/2008/08/model-mvc-million-contacts-march.html"&gt;model&lt;/a&gt;, view/controler, &lt;a href="http://lwuit.blogspot.com/2008/07/lwuit-list-renderer-by-chen-fishbein.html"&gt;renderer&lt;/a&gt;). The difference between lists and container/component hierarchy can be summed up quite easily: "Lists are about showing data, containers are about showing widgets".&lt;br /&gt;Widgets can be anything, tend to be interactive and have elaborate hierarchies.&lt;br /&gt;Data can be presented in many ways and might come in very large volumes.&lt;br /&gt;&lt;br /&gt;This is easy to illustrate with the features of list, e.g. a list can be horizontal or fixed in various ways (as you would do to data) but its very hard to implement something like that with the container/component model.&lt;br /&gt;&lt;br /&gt;Naturally each approach has its use cases and advantages and sometimes its really hard to shoehorn one approach to the other but we are sometimes forced to do so due to design aesthetic e.g. variable sized list.&lt;br /&gt;Allot of people had an issue with implementing our recommended approach since they wanted to share code that used the list model/renderer approach with code that used layout managers. While this was technically possible its not trivial and is a common enough use case to fold it into LWUIT which is exactly what we did.&lt;br /&gt;&lt;br /&gt;ContainerList is effectively a container that tries to abide by the contract of the list component, it creates thin internal components that render themselves using the cell renderer. To achieve this we had to replace the ListCellRenderer (which is now deprecated but still working) with the new CellRenderer interface. The original ListCellRenderer methods accept a List component which doesn't make sense for the new component, the CellRenderer interface resolves these issues.&lt;br /&gt;&lt;br /&gt;Generally the class is a plugin replacement for a list with the addition of quite a few features from container through the ability to set the layout to anything we want, e.g. to accomplish variable size lists just use BoxLayout on Y_AXIS. To accomplish a grid just use grid layout as we do in the LWUIT demo that I just committed (see the video above).&lt;br /&gt;&lt;br /&gt;The newest version of the resource editor now includes support for this component in the GUI builder as well as some other nifty features such as marking the components that have code associated with them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1378596304160000262?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1378596304160000262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/04/contain-that-list-bringing-containers.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1378596304160000262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1378596304160000262'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/04/contain-that-list-bringing-containers.html' title='Contain That List - Bringing Containers &amp;amp; List&amp;#39;s Together'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/QqnhKjxGmK4/default.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-8543944155927593949</id><published>2011-04-06T12:58:00.000-07:00</published><updated>2012-02-03T11:47:49.224-08:00</updated><title type='text'>Resource Editor Tutorial Rebooted: Introduction And Walkthrough</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="510" src="http://www.youtube.com/embed/gYN1QtelS9o" title="YouTube video player" width="853"&gt;&lt;/iframe&gt;&lt;br /&gt;Yes a "do over" so soon for the resource editor tutorial. You must admit this one is way better than the last one.&lt;br /&gt;While the first part is very verbose I'll try to keep the following to a more concise "How To" format which I think will be more helpful when integrated with the tool itself.&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-8543944155927593949?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/8543944155927593949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/04/resource-editor-tutorial-rebooted.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8543944155927593949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8543944155927593949'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/04/resource-editor-tutorial-rebooted.html' title='Resource Editor Tutorial Rebooted: Introduction And Walkthrough'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/gYN1QtelS9o/default.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3738387468042138368</id><published>2011-04-04T22:40:00.000-07:00</published><updated>2012-02-03T11:47:49.042-08:00</updated><title type='text'>The Many Images Of LWUIT</title><content type='html'>When we initially came out with LWUIT we inherited some baggage from J2ME in the form of several image types: loaded, RGB (builtin), RGB (lwuit) and Mutable. We quickly added Indexed and StaticAnimation. We later on added then replaced SVG support (then replaced it again) but the image landscape remained relatively static until this past year.&lt;br /&gt;In LWUIT 1.4 we finally introduced EncodedImage which to us was a complete epiphany in how images "should" work in mobile devices. We now also have an even newer approach to SVG, Multi-Image &amp;amp; Timeline. And I won't even go into LWUIT4IO which has the FileEncodedImage and FileEncodedImageAsync options...&lt;br /&gt;&lt;br /&gt;I will now try to explain the pros/cons and logic behind every image type and how its created:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Loaded Image - this is the basic image you get when loading an image from the jar or network using Image.createImage(String)/Image.createImage(InputStream)/Image.createImage(byte[], int, int).&lt;br /&gt;In MIDP calling getGraphics() on an image like this will throw an exception (its immutable in MIDP terms), this is true for almost all other images as well.&amp;nbsp; This is strictly a MIDP restriction and might not apply for all platforms.&lt;br /&gt;The image is encoded based on device logic and should be reasonably efficient.&lt;/li&gt;&lt;li&gt;RGB Image (internal) - close cousin of the loaded image. This image is created using the method Image.createImage(int[], int, int) and receives ARGB data forming the image. It is usually (although not always) a high color image. Its more efficient than the LWUIT RGB image but can't be modified, at least not on the pixel level.&lt;/li&gt;&lt;li&gt;RGBImage (LWUIT) - constructed via the RGBImage class constructors this image is effectively an ARGB array that can be drawn by LWUIT. On many platforms this is quite inefficient but for some pixel level manipulations there is just no other way.&lt;/li&gt;&lt;li&gt;IndexedImage/StaticAnimation - Both are deprecated and replaced by the more efficient and effective EncodedImage/Timeline. IndexedImage's allow storing images using a palette array and a byte per pixel (indexed images must not contain more than 256 colors). Static animations add to that by animating frames using a line difference algorithm.&amp;nbsp;&lt;/li&gt;&lt;li&gt;EncodedImage - created via the encoded image static methods, the encoded image is effectively a loaded image that is "hidden". When creating an encoded image only the PNG (or jpeg etc.) is loaded to an array in RAM. Normally such images are very small relatively so they can be kept in memory without much effect. When image information is needed (e.g. pixels, dimension etc.) the image is decoded into RAM and kept in a weak/sort reference.&lt;br /&gt;This allows the image to be cached for performance and allows the garbage collector to reclaim it when the memory becomes scarce.&lt;br /&gt;Encoded image is not final and can be derived to produce complex image fetching strategies such as lazily loading an image from the filesystem.&lt;/li&gt;&lt;li&gt;SVG - SVG's can be loaded directly via Image.createSVG() if Image.isSVGSupported() returns true. When adding SVG's via the resource editor fallback images are produced for devices that do not support SVG.&lt;/li&gt;&lt;li&gt;Multi-Image - This is seamless to developers who receive a multi-image as an EncodedImage. In the resource editor one can add several images based on the DPI of the device (one of several predefined family ranges). When loading the resource file irrelevant images are skipped thus saving the additional memory.&lt;br /&gt;Multi-images are ideal for icons or small artifacts that are hard to scale properly. They are not meant to replace things such as 9-image borders etc. since adapting them to every resolution or to device rotation isn't practical.&lt;/li&gt;&lt;li&gt;Timeline - Timeline's allow rudimentary animation and enable GIF importing using the resource editor. Effectively a timeline is a set of images that can be moved rotated, scaled &amp;amp; blended to provide interesting animation effects. It can be created manually using the Timeline class.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;All image types are mostly seamless to use and will just work with drawImage and various image related image API's for the most part with caveats on performance etc. For animation images the code must invoke images animate() method&amp;nbsp; (this is done automatically by LWUIT when placing the image as a background or as an icon! You only need to do it for drawImage code).&lt;br /&gt;All images might also be animated in theory e.g. my &lt;a href="http://lwuit.blogspot.com/2010/05/animated-gifs-everywhere.html"&gt;gif implementation&lt;/a&gt; returned animated gifs from the standard Loaded Image methods and this worked pretty seamlessly (since Icons's and backgrounds just work). To find out if an image is animated you need to use the isAnimation() method, currently SVG images are animated in MIDP but most of our ports don't support GIF animations by default (although it should be easy to add to some of them).&lt;br /&gt;&lt;br /&gt;Performance and memory wise you should read the above carefully and be aware of the image types you use. The resource editor tries to conserve memory and be "clever" by using only encoded images, while these are great for low memory they are not as efficient as loaded images in terms of speed. Also when scaled these images have much larger overhead since they need to be converted to RGB, scaled and then a new image is created. Keeping all these things in mind when optimizing a specific UI is very important.&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3738387468042138368?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3738387468042138368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/04/many-images-of-lwuit.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3738387468042138368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3738387468042138368'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/04/many-images-of-lwuit.html' title='The Many Images Of LWUIT'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2786073254158644793</id><published>2011-04-03T12:03:00.000-07:00</published><updated>2012-02-03T11:47:48.985-08:00</updated><title type='text'>A New Way To LWUIT Explained Visually</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="510" src="http://www.youtube.com/embed/spHhJR8IcEU" title="YouTube video player" width="853"&gt;&lt;/iframe&gt;&lt;br /&gt;My latest post covering the development in LWUIT using the new project structure might not have been clear enough so I decided to pull up &lt;a href="http://www.screencast-o-matic.com/"&gt;screencast-o-matic.com&lt;/a&gt; to make a quick video of how this looks on my PC (and really got a kick off of their zooming and annotation capabilities in the process).&lt;br /&gt;I hope this makes it clear how cool it is to have a proper SE port and this new project structure to work with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2786073254158644793?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2786073254158644793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/04/new-way-to-lwuit-explained-visually.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2786073254158644793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2786073254158644793'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/04/new-way-to-lwuit-explained-visually.html' title='A New Way To LWUIT Explained Visually'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/spHhJR8IcEU/default.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4710647744880482274</id><published>2011-03-29T22:15:00.000-07:00</published><updated>2012-02-03T11:47:49.077-08:00</updated><title type='text'>A New Way To LWUIT</title><content type='html'>&lt;script src="http://www.java.com/js/deployJava.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script&gt;    var attributes = {codebase:'http://java.net/projects/lwuit/sources/svn/content/trunk/www/demoApplet',                      align:'right',                      code:'com.sun.lwuit.uidemo.LWUITApplet.class',                      archive:'LWUITDemoDesktop.jar',                      width:320, height:480} ;    var parameters = {fontSize:16} ;    var version = '1.6' ;    deployJava.runApplet(attributes, parameters, version);&lt;/script&gt;&lt;br /&gt;LWUIT &lt;b&gt;had&lt;/b&gt; a MIDP bias. It started as a MIDP project so it is perfectly understandable, however moving forward to support RIM and other platforms (e.g. &lt;a href="http://www.pader-sync.com/lwuit-for-blackberry-and-android.html"&gt;Thorsten's great work&lt;/a&gt;) we wanted to completely disconnect LWUIT from its platform specific roots and offer some great new features in the process.&lt;br /&gt;It started off when we generated projects for the GUI builder, but we decided to take this further into the LWUIT Demo and make that approach into our project structure recommendation. You can checkout the source code for the new LWUIT Demo from SVN to see the actual structure.&lt;br /&gt;&lt;br /&gt;Basically what we are doing is placing all the LWUIT portable code into a MIDP shared library, this is effectively the common code for the project. Here we also place the common resources used within all the different ports.&lt;br /&gt;Underneath this project (mostly for convenience not due to necessity) we place subprojects that depend on that parent project and are platform specific. That way we don't need a pre-processor or any similar tool to gain both portability and the ability to utilize platform specific features when we want to do so.&lt;br /&gt;&lt;br /&gt;The really cool feature hidden beneath this is the ability to utilize the JavaSE port to run the application. Besides running practically instantly (no simulator!), the biggest hit is the ability to use Java SE level development tools!&lt;br /&gt;Edit &amp;amp; continue, profilers, threadalizers, memory monitors etc. Its a whole different scale of debugging for business logic (assuming the issue reproduces on the SE port). Besides debugging this feature allows you to embed your application as an Applet right into a web page to provide users with a live preview of your application! How cool is that!&lt;br /&gt;&lt;br /&gt;To your right you can (hopefully) see a running Applet containing the current version of the LWUIT demo. You can use escape as a back button, F1 as the menu button and the arrow keys/mouse to navigate within this Applet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4710647744880482274?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4710647744880482274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/03/new-way-to-lwuit.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4710647744880482274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4710647744880482274'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/03/new-way-to-lwuit.html' title='A New Way To LWUIT'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4927013713101491795</id><published>2011-03-22T23:07:00.000-07:00</published><updated>2012-02-03T11:47:49.088-08:00</updated><title type='text'>FYI About the videos I've been uploading</title><content type='html'>I'm currently in the midst of making major usability UI improvements to the resource editor which already changed quite allot since I started making the screencasting videos of it. I also discovered &lt;a href="http://www.screencast-o-matic.com/"&gt;http://www.screencast-o-matic.com/&lt;/a&gt; which seems to be exactly what I needed and is written in Java!&lt;br /&gt;&lt;br /&gt;As a result of all of these I decided to complete the changes for the upcoming resource editor version and "reboot" the video tutorial with better planning for my goals. I'll keep the existing videos online for reference but will start making a far improved tutorial in a short while. One of the biggest blockers for me is actually finding some quite time to record, not a moment of quiet for the wary...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4927013713101491795?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4927013713101491795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/03/fyi-about-videos-i-been-uploading.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4927013713101491795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4927013713101491795'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/03/fyi-about-videos-i-been-uploading.html' title='FYI About the videos I&amp;#39;ve been uploading'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3137449324949132521</id><published>2011-03-21T02:45:00.000-07:00</published><updated>2012-02-03T11:47:49.014-08:00</updated><title type='text'>List Rendering: The Easy Way. Generic List Cell Renderer</title><content type='html'>LWUIT is really powerful and flexible, we took the power and flexibility of Swing and went even further (styles, painters) and one such power is the &lt;a href="http://lwuit.blogspot.com/2008/07/lwuit-list-renderer-by-chen-fishbein.html"&gt;cell renderer&lt;/a&gt;. This is a concept we derived from Swing which is both remarkably powerful and pretty hard for newbies to figure out, frankly its pretty hard for everyone...&lt;br /&gt;As part of the GUI builder work we needed a way to &lt;a href="http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-6.html"&gt;customize rendering&lt;/a&gt; for a List but the &lt;a href="http://lwuit.blogspot.com/2008/07/lwuit-list-renderer-by-chen-fishbein.html"&gt;renderer&lt;/a&gt;/&lt;a href="http://lwuit.blogspot.com/2008/08/model-mvc-million-contacts-march.html"&gt;model&lt;/a&gt; approach seemed impossible to adapt to a GUI builder (it seems the Swing GUI builders had a similar issue). Our solution was to introduce the GenericListCellRenderer which while introducing limitations and implementation requirements still manages to make life easier both in the GUI builder and outside of it.&lt;br /&gt;&lt;br /&gt;A small refresher of the LWUIT List MVC approach for those who haven't read the links above:&lt;br /&gt;A LWUIT list doesn't contain components but rather arbitrary data, this seems odd at first but makes perfect sense... If you want a list to contain components just use a Container.&lt;br /&gt;The advantage of using a List in this way is that we can display it in many ways (e.g. fixed focus positions, horizontally etc.) and that we can have more than a million entries without performance overhead. We can also do some pretty nifty things like filter the list on the fly or fetch it dynamically from the internet as the user scrolls down the list.&lt;br /&gt;To achieve these things the list uses two interfaces: ListModel and ListCellRenderer.&lt;br /&gt;List model represents the data, its responsibility is to return the arbitrary object within the list at a given offset. Its second responsibility is to notify the list when the data changes so the list can refresh, think of it as an array of objects that can notify you when you get changes.&lt;br /&gt;The list renderer is like a rubber stamp that knows how to draw an object from the model, its called many times per entry in an animated list and must be very fast. Unlike standard LWUIT components it is only used to draw the entry in the model and immediately discarded hence it has no memory overhead but if it takes too long to process a model value it can be a big bottleneck!&lt;br /&gt;This is all very generic but a bit too much for most, doing a list "properly" requires some understanding. The main source of confusion for developers is the stateless nature of the list and transferal of state to the model (e.g. a checkbox list needs to listen to action events on the list and update the model in order for the renderer to display that state... Once you understand that its easy).&lt;br /&gt;&lt;br /&gt;GenericListCellRenderer is a renderer designed to be as simple to use as a Component-Container hierarchy, we effectively crammed most of the common renderer use cases into one class. To enable that we need to know the content of the objects within the model, so the GenericListCellRenderer assumes the model contains only Hashtable objects. Since Hashtable's can contain arbitrary data the list model is still quite generic and allows storing application specific data, furthermore a Hashtable can still be derived and extended to provide domain specific business logic.&lt;br /&gt;The GenericListCellRenderer accepts two container instances (more later on why at least two and not one) which it maps to individual Hashtable entries within the model by finding the appropriate components within the given container hierarchy. Components are mapped to the Hashtable entries based on the name property of the component (get/setName) and the key value within the Hashtable e.g.:&lt;br /&gt;For a model that contains a Hashtable entry like this:&lt;br /&gt;"Foo": "Bar"&lt;br /&gt;"X": "Y"&lt;br /&gt;"Not": "Applicable"&lt;br /&gt;"Number": Integer(1)&lt;br /&gt;&lt;br /&gt;A renderer will loop over the component hierarchy in the container searching for component's whose name matches Foo, X, Not and Number and assign to them the appropriate value. Notice that you can also use image objects as values and they will be assigned to labels as expected. However, you can't assign both an image and a text to a single label since the key will be taken. That isn't a big problem since two labels can be used quite easily in such a renderer.&lt;br /&gt;To make matters even more attractive the renderer seamlessly supports list tickering when appropriate and if a CheckBox appears within the renderer it will toggle a boolean flag within the Hashtable seamlessly.&lt;br /&gt;One&amp;nbsp; issue that crops up with this approach is that if a value is missing from the hashtable it is treated as empty and the component is reset, this can pose an issue if we hardcode an image or text within the renderer and we don't want them replace (e.g. an arrow graphic). The solution for this is to name the component with Fixed in the end of the name e.g.: HardcodedIconFixed.&lt;br /&gt;Naming a component within the renderer with $number will automatically set it as a counter component for the offset of the component within the list. &lt;br /&gt;&lt;br /&gt;Styling the GenericListCellRenderer is slightly different, the renderer uses the UIID of the container passed to the generic list cell renderer and the background focus uses that same UIID with the word "Focus" appended. &lt;br /&gt;It is important to notice that the generic list cell renderer will grant focus to the child components of the selected entry if they are focusable thus changing the style of said entries. E.g. a Container might have a child label that has one style when the parent container is unselected and another when its selected (focused), this can be easily achieved by defining the label as focusable. Notice that the component will never receive direct focus since it is still a par of a renderer.&lt;br /&gt;&lt;br /&gt;Last but not least, the generic list cell renderer accepts two or four instances of a Container rather than the obvious choice of accepting only one instance. This allows the renderer to treat the selected entry differently which is especially important to tickering although its also useful for fisheye. Since it might not be practical to seamlessly clone the Container for the renderer's needs LWUIT expects the developer to provide two separate instances, they can be identical in all respects but they must be separate instances for tickering to work. The renderer also allows for a fisheye effect where the selected entry is actually different from the unselected entry in its structure, it also allows for a pinstripe effect where odd/even rows have different styles (this is accomplished by providing 4 instances of the containers selected/unselected for odd/even). &lt;br /&gt;&lt;br /&gt;The best way to learn about the generic list cell renderer and the hashtable model is by playing with them in the GUI builder, however they can be used in code without any dependency on the GUI builder and can be quite useful at that.&lt;br /&gt;&lt;br /&gt;Here is a simple sample for a list with checkboxes that get updated automatically:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: #2040a0;"&gt;List&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;list&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;List&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;createGenericListCellRendererModelData&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #2040a0;"&gt;list&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setRenderer&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;GenericListCellRenderer&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;createGenericRendererContainer&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;createGenericRendererContainer&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;private&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Container&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;createGenericRendererContainer&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;Container&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;c&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Container&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;BorderLayout&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setUIID&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"ListRenderer"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;Label&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;name&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Label&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;name&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setFocusable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;name&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setName&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Name"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;addComponent&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;BorderLayout&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;CENTER&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;name&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;Label&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;surname&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Label&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;surname&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setFocusable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;surname&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setName&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Surname"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;addComponent&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;BorderLayout&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;SOUTH&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;surname&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;CheckBox&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;selected&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;CheckBox&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;selected&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setName&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Selected"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;selected&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setFocusable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;addComponent&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;BorderLayout&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;WEST&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;selected&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;strong&gt;return&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;private&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;createGenericListCellRendererModelData&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt; &lt;span&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;5&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;0&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;0&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Name"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Shai"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;0&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Surname"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Almog"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;0&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Selected"&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;Boolean&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;TRUE&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;1&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;1&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Name"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Chen"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;1&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Surname"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Fishbein"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;1&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Selected"&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;Boolean&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;TRUE&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;2&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;2&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Name"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Ofir"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;2&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Surname"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Leitner"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;3&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;3&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Name"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Yaniv"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;3&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Surname"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Vakarat"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;4&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;strong&gt;new&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;Hashtable&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;4&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Name"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Meirav"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;&lt;strong&gt;[&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;4&lt;/span&gt;&lt;span&gt;&lt;strong&gt;]&lt;/strong&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;put&lt;/span&gt;&lt;span&gt;&lt;strong&gt;(&lt;/strong&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Surname"&lt;/span&gt;, &lt;span style="color: green;"&gt;"Nachmanovitch"&lt;/span&gt;&lt;span&gt;&lt;strong&gt;)&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;strong&gt;return&lt;/strong&gt; &lt;span style="color: #2040a0;"&gt;data&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3137449324949132521?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3137449324949132521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/03/list-rendering-easy-way-generic-list.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3137449324949132521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3137449324949132521'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/03/list-rendering-easy-way-generic-list.html' title='List Rendering: The Easy Way. Generic List Cell Renderer'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-3147609952433275679</id><published>2011-03-17T14:37:00.000-07:00</published><updated>2012-02-03T11:47:49.016-08:00</updated><title type='text'>Constantly Theme'd</title><content type='html'>One of the often requested features in LWUIT's themes has been the addition of constants for themes. Constants allow the theme designer to "hint" of desired functionality to the application code, e.g. a particular theme might have a constant indicating that it wants the scrollbar to fadeout when unused.&lt;br /&gt;The LWUIT resource editor now includes an additional tab for creating such constants which can be used to add constant values. These can be added in the ant task by prepending the @ sign before the constant key in the theme and setting the value to the appropriate string.&lt;br /&gt;Constants are always strings, they have some conventions where a constant ending with Bool is treated as a boolean true/false value and a constant ending with Int or Image (for image the string name of the image is stored but the image instance will be returned).&lt;br /&gt;&lt;br /&gt;To use a constant one can use the UIManager's methods to get the appropriate constant type specifically:&lt;br /&gt;getThemeConstant &lt;br /&gt;isThemeConstant&lt;br /&gt;getThemeImageConstant&lt;br /&gt;&lt;br /&gt;Internally LWUIT has several builtin constants and the list is constantly growing as we add features to LWUIT, we will try to keep this list up to date when possible.&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" id="tblMain"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="tblGenFixed" id="tblMain_0"&gt;&lt;tbody&gt;&lt;tr class="rShim"&gt;&lt;td class="rShim" style="width: 0;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 188px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 602px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s0"&gt;&lt;b&gt;LWUIT Constant&lt;/b&gt;&lt;/td&gt;&lt;td class="s1"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;centeredPopupBool&lt;/td&gt;&lt;td class="s3"&gt;Popup of the combo box will appear in the center of the screen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;checkBoxCheckDisImage&lt;/td&gt;&lt;td class="s3"&gt;CheckBox image to use instead of LWUIT drawing it on its own&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;checkBoxCheckedImage&lt;/td&gt;&lt;td class="s3"&gt;CheckBox image to use instead of LWUIT drawing it on its own&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;checkBoxUncheckDisImage&lt;/td&gt;&lt;td class="s3"&gt;CheckBox image to use instead of LWUIT drawing it on its own&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;checkBoxUncheckedImage&lt;/td&gt;&lt;td class="s3"&gt;CheckBox image to use instead of LWUIT drawing it on its own&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;comboImage&lt;/td&gt;&lt;td class="s3"&gt;Combo image to use instead of LWUIT drawing it on its own&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;commandBehavior&lt;/td&gt;&lt;td class="s3"&gt;Indicates how commands should act, as a touch menu, native menu etc. Possible values: SoftKey, Touch, Bar, Title, Right, Native&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;defaultCommandImage&lt;/td&gt;&lt;td class="s3"&gt;Image to give a command with no icon&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dialogButtonCommandsBool&lt;/td&gt;&lt;td class="s3"&gt;Place commands in the dialogs as buttons&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dialogPosition&lt;/td&gt;&lt;td class="s3"&gt;Place the dialog in an arbitrary border layout position (e.g. North, South, Center etc.)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dialogTransitionIn&lt;/td&gt;&lt;td class="s3"&gt;Default transition for dialog&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dialogTransitionInImage&lt;/td&gt;&lt;td class="s3"&gt;Default transition Image for dialog, causes a Timeline transition effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dialogTransitionOut&lt;/td&gt;&lt;td class="s3"&gt;Default transition for dialog&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dialogTransitionOutImage&lt;/td&gt;&lt;td class="s3"&gt;Default transition Image for dialog, causes a Timeline transition effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;disabledColor&lt;/td&gt;&lt;td class="s3"&gt;Color to use when disabling entries by default&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dlgCommandButtonSizeInt&lt;/td&gt;&lt;td class="s3"&gt;Minimum size to give to command buttons in the dialog&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dlgSlideDirection&lt;/td&gt;&lt;td class="s3"&gt;Slide hints&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dlgSlideInDirBool&lt;/td&gt;&lt;td class="s3"&gt;Slide hints&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;dlgSlideOutDirBool&lt;/td&gt;&lt;td class="s3"&gt;Slide hints&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="tblGenFixed" id="tblMain_1"&gt;&lt;tbody&gt;&lt;tr class="rShim"&gt;&lt;td class="rShim" style="width: 0;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 188px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 602px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;fadeScrollBarBool&lt;/td&gt;&lt;td class="s3"&gt;Fade transition hints&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;fadeScrollEdgeBool&lt;/td&gt;&lt;td class="s3"&gt;Fade transition hints&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;fadeScrollEdgeInt&lt;/td&gt;&lt;td class="s3"&gt;Fade transition hints&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;firstCharRTLBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates the GenericListCellRenderer should determine RTL status based on the first character in the sentence&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;fixedSelectionInt&lt;/td&gt;&lt;td class="s3"&gt;Number corresponding to the fixed selection constants in List&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;formTransitionIn&lt;/td&gt;&lt;td class="s3"&gt;Default transition for form&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;formTransitionInImage&lt;/td&gt;&lt;td class="s3"&gt;Default transition Image for form, causes a Timeline transition effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;formTransitionOut&lt;/td&gt;&lt;td class="s3"&gt;Default transition for form&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;formTransitionOutImage&lt;/td&gt;&lt;td class="s3"&gt;Default transition Image for form, causes a Timeline transition effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;hideEmptyTitleBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates that a title with no content should be hidden even if the border for the title occupies space&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;ignorListFocusBool&lt;/td&gt;&lt;td class="s3"&gt;Hide the focus component of the list when the list doesn't have focus&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;listItemGapInt&lt;/td&gt;&lt;td class="s3"&gt;Builtin item gap in the list, this defaults to 2 which predated padding/margin in LWUIT&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuHeightPercent&lt;/td&gt;&lt;td class="s3"&gt;Allows positioning and sizing the menu&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuPrefSizeBool&lt;/td&gt;&lt;td class="s3"&gt;Allows positioning and sizing the menu&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuSlideDirection&lt;/td&gt;&lt;td class="s3"&gt;Defines menu entrance effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuSlideInDirBool&lt;/td&gt;&lt;td class="s3"&gt;Defines menu entrance effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuSlideOutDirBool&lt;/td&gt;&lt;td class="s3"&gt;Defines menu entrance effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuTransitionIn&lt;/td&gt;&lt;td class="s3"&gt;Defines menu entrance effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuTransitionInImage&lt;/td&gt;&lt;td class="s3"&gt;Defines menu entrance effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuTransitionOut&lt;/td&gt;&lt;td class="s3"&gt;Defines menu entrance effect&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="tblGenFixed" id="tblMain_2"&gt;&lt;tbody&gt;&lt;tr class="rShim"&gt;&lt;td class="rShim" style="width: 0;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 188px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 602px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuTransitionOutImage&lt;/td&gt;&lt;td class="s3"&gt;Defines menu entrance effect&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;menuWidthPercent&lt;/td&gt;&lt;td class="s3"&gt;Allows positioning and sizing the menu&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;otherPopupRendererBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates that a separate renderer UIID/instance should be used to the list within the combo box popup&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;popupCancelBodyBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates that a cancel button should appear within the combo box popup&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;popupTitleBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates that a title should appear within the combo box popup&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;pureTouchBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates the pure touch mode&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;radioSelectedDisImage&lt;/td&gt;&lt;td class="s3"&gt;Radio button image&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;radioSelectedImage&lt;/td&gt;&lt;td class="s3"&gt;Radio button image&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;radioUnselectedDisImage&lt;/td&gt;&lt;td class="s3"&gt;Radio button image&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;radioUnselectedImage&lt;/td&gt;&lt;td class="s3"&gt;Radio button image&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;rendererShowsNumbersBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates whether renderers should render the entry number&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;reverseSoftButtonsBool&lt;/td&gt;&lt;td class="s3"&gt;Swaps the softbutton positions&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;slideDirection&lt;/td&gt;&lt;td class="s3"&gt;Default slide transition settings&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;slideInDirBool&lt;/td&gt;&lt;td class="s3"&gt;Default slide transition settings&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;slideOutDirBool&lt;/td&gt;&lt;td class="s3"&gt;Default slide transition settings&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;snapGridBool&lt;/td&gt;&lt;td class="s3"&gt;Snap to grid toggle&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;tabsFillRowsBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates if the tabs should fill the row using flow layout&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;tabsGridBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates whether tabs should use a grid layout thus forcing all tabs to have identical sizes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;tickerSpeedInt&lt;/td&gt;&lt;td class="s3"&gt;The speed of label/button etc. tickering in ms.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;tintColor&lt;/td&gt;&lt;td class="s3"&gt;The aarrggbb hex color to tint the screen when a dialog is shown&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;table border="0" cellpadding="0" cellspacing="0" class="tblGenFixed" id="tblMain_3"&gt;&lt;tbody&gt;&lt;tr class="rShim"&gt;&lt;td class="rShim" style="width: 0;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 188px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="rShim" style="width: 602px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;touchCommandFillBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates how the touch menu should layout the commands within&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;touchCommandFlowBool&lt;/td&gt;&lt;td class="s3"&gt;Indicates how the touch menu should layout the commands within&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;touchMenuBool&lt;/td&gt;&lt;td class="s3"&gt;Force the touch menu&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="hd"&gt;&lt;div style="height: 16px;"&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class="s2"&gt;transitionSpeedInt&lt;/td&gt;&lt;td class="s3"&gt;Indicates the default speed for transitions&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;One "odd" behavior of constants is that once they are set by a theme they don't get "lost" when replacing the theme. E.g. if one would set the comboImage constant to a specific value in theme A and then switch to theme B that doesn't define the comboImage, the original theme A comboImage might remain. The reason for this is simple, when extracting the constant values components keep the values in cache locally and just don't track the change in value. Furthermore, since the components allow manually setting values its impractical for them to track whether a value was set by a constant or explicitly by the user.&lt;br /&gt;The solution for this is to either manually reset undesired values before replacing a theme (e.g. for the case above by calling the default look and feel method for setting the combo image with a null value) or defining a constant value to replace the existing value.&lt;br /&gt;&lt;br /&gt;BTW I haven't been blogging or posting videos as often as I should both because I have been a bit under the weather and because I have been quite swamped with work (checkout the SVN changes). Hopefully I'll feel a bit better next week and increase my blogging a bit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-3147609952433275679?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/3147609952433275679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/03/constantly-theme.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3147609952433275679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/3147609952433275679'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/03/constantly-theme.html' title='Constantly Theme&amp;#39;d'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-8709933331485507477</id><published>2011-03-07T12:42:00.000-08:00</published><updated>2012-02-03T11:47:49.230-08:00</updated><title type='text'>New Project Hierarchy For LWUIT</title><content type='html'>I haven't posted in a short while because we have some big things coming for LWUIT, I just committed a major restructuring of the LWUIT workspace which essentially moved everything around to more sensible locations. We made a tag just before the move so if you have hard dependencies on the old LWUIT workspace structure you can use that tag.&lt;br /&gt;The new structure makes more sense for LWUIT ports since it removes all the none cross platform (MIDP specific code) from LWUIT and moves it entirely to the ports directory. This allows LWUIT to treat all ports to all platforms on even grounds and simplify the build process for such ports. In the past allot of things such as applications and LWUIT4IO were located under MIDP which made no sense at all (other than historic sense), so now we have two portable projects: UI &amp;amp; IO. Which are actually useless on their own.&lt;br /&gt;You need to pick the specific project for your platform to link against from the ports folder where we have both an IO and a UI project for every supported platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-8709933331485507477?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/8709933331485507477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/03/new-project-hierarchy-for-lwuit.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8709933331485507477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8709933331485507477'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/03/new-project-hierarchy-for-lwuit.html' title='New Project Hierarchy For LWUIT'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-9044198290028700247</id><published>2011-02-21T06:40:00.000-08:00</published><updated>2012-02-03T11:47:49.238-08:00</updated><title type='text'>Put A Face On It</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://img829.imageshack.us/img829/1095/fb5.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://img829.imageshack.us/img829/1095/fb5.png" /&gt;&lt;/a&gt;&lt;/div&gt;majimob, long known for its music related apps as well as some other LWUIT based endeavors has just released a &lt;a href="http://www.getjar.com/majiFB/"&gt;facebook application written entirely in LWUIT&lt;/a&gt; and using LWUIT4IO. The application was written in the new LWUIT GUI builder in record time and features direct access to the facebook API.&lt;br /&gt;The application supports both touch and feature phone interaction, it was designed to work on all mobile phones including blackberries and Android devices (although since Android has a pretty good facebook app there are no current plans for such a version).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-9044198290028700247?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/9044198290028700247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/02/put-face-on-it.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9044198290028700247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9044198290028700247'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/02/put-face-on-it.html' title='Put A Face On It'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4786605597434052774</id><published>2011-02-14T07:26:00.000-08:00</published><updated>2012-02-03T11:47:49.080-08:00</updated><title type='text'>Musix Under The Skin</title><content type='html'>&lt;iframe title="YouTube video player" width="640" height="510" src="http://www.youtube.com/embed/e-mAvQQ2TK8" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;br /&gt;In this video I review the GUI of the musix application in the resource editor shedding some light on how it was implemented using the LWUIT GUI builder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4786605597434052774?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4786605597434052774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/02/musix-under-skin.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4786605597434052774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4786605597434052774'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/02/musix-under-skin.html' title='Musix Under The Skin'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/e-mAvQQ2TK8/default.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2591771404716970120</id><published>2011-02-09T05:47:00.000-08:00</published><updated>2012-02-03T11:47:48.961-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Designer LWUITDesigner ResourceEditor Musix apps android'/><title type='text'>A Touch Of Musix</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="510" src="http://www.youtube.com/embed/HBs1ZC5CFFI" title="YouTube video player" width="853"&gt;&lt;/iframe&gt;&lt;br /&gt;This is a preliminary video of the new touch optimized Musix DRM'd media player application from Triplay/majimob deploying on the network of the Israeli operator Pelephone. This is the first commercially available LWUIT application that I know of that was developed entirely in the GUI builder and in fact help us shape allot of the requirements for the GUI builder.&lt;br /&gt;As a beta tester of the GUI builder implementation we worked very closely with the application development and I have full access to the source/UI code. I will try to post a quick walk-through of how the GUI builder was used to create such an application (its even bigger than the video makes it out to be).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2591771404716970120?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2591771404716970120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/02/touch-of-musix.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2591771404716970120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2591771404716970120'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/02/touch-of-musix.html' title='A Touch Of Musix'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/HBs1ZC5CFFI/default.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1003434980918029330</id><published>2011-02-06T01:35:00.000-08:00</published><updated>2012-02-03T11:47:48.893-08:00</updated><title type='text'>LWUIT Resource Editor Developers Tutorial Part 2 (PSD Tutorial Part 4)</title><content type='html'>&lt;iframe allowfullscreen="" frameborder="0" height="510" src="http://www.youtube.com/embed/FXhlghkgsHE" title="YouTube video player" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;In this part of the LWUIT developer tutorial we go into details of mapping the demo created in the PSD tutorial to actual code that calls LWUIT4IO. We show mapping regular LWUIT components to server REST operations as well as mapping a LWUIT List model to server results.&lt;br /&gt;I committed the code and res file to the lwuit incubator project (notice it has a new SVN URL! &lt;a href="https://svn.java.net/svn/lwuit-incubator%7Esvn/trunk"&gt;https://svn.java.net/svn/lwuit-incubator~svn/trunk&lt;/a&gt;). There was a minor bug in my code near the end triggering an exception it was due to the for loop adding to the vector before setting the offset for the request. This is fixed in the incubator project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1003434980918029330?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1003434980918029330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/02/lwuit-resource-editor-developers.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1003434980918029330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1003434980918029330'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/02/lwuit-resource-editor-developers.html' title='LWUIT Resource Editor Developers Tutorial Part 2 (PSD Tutorial Part 4)'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/FXhlghkgsHE/default.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-7052169424564635037</id><published>2011-02-02T07:36:00.000-08:00</published><updated>2012-02-03T11:47:49.192-08:00</updated><title type='text'>LWUIT Resource Editor PSD Tutorial Part 3: Image Search Application</title><content type='html'>&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/fBnJZTL5Yt0" frameborder="0" allowFullScreen&gt;&lt;/iframe&gt;&lt;br /&gt;In this part of the resource editor PSD tutorial we take the design and turn it into a simple image search application. I stopped at this cutoff point since the bounds are limitless, I could go on with extracting the dialog UI and various other widgets but hopefully the picture of what can be done with photoshop and some resource editor hacking should be clear from these tutorials.&lt;br /&gt;Next time I will go into details on how to bind this to actual code in the second part of the developer tutorial.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-7052169424564635037?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/7052169424564635037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/02/lwuit-resource-editor-psd-tutorial-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7052169424564635037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7052169424564635037'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/02/lwuit-resource-editor-psd-tutorial-part.html' title='LWUIT Resource Editor PSD Tutorial Part 3: Image Search Application'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/fBnJZTL5Yt0/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-8483872787585205492</id><published>2011-01-31T06:12:00.000-08:00</published><updated>2012-02-03T11:47:49.221-08:00</updated><title type='text'>New Resource Editor (change your URL's) &amp; Kenai updates</title><content type='html'>We are trying to get up to speed with Kenai, allot of the functionality is lost or very different so we currently don't have many of the things we used to have like the customized home page or the featured apps page. But at least we now have the new version of the resource editor launchable again.&lt;br /&gt;Since the SVN changed (make sure to update to the new LWUIT SVN!!!!), the URL's for the resource editor webstart application have also changed and we can no longer deliver updates on the old URL. Please use the following button to launch the new resource editor:&lt;br /&gt;&lt;br /&gt;&lt;script src="http://www.java.com/js/deployJava.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script&gt;    var url = "http://java.net/projects/lwuit/sources/svn/content/trunk/www/designer/launch.jnlp";    deployJava.createWebStartLaunchButton(url, '1.6.0');&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;If you are experiencing troubles with the above link (e.g. if you disabled Java in your browser) you can use the &lt;a href="http://java.net/projects/lwuit/sources/svn/content/trunk/www/designer/launch.jnlp"&gt;jnlp directly&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-8483872787585205492?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/8483872787585205492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/01/new-resource-editor-change-your-url.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8483872787585205492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8483872787585205492'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/01/new-resource-editor-change-your-url.html' title='New Resource Editor (change your URL&amp;#39;s) &amp;amp; Kenai updates'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-6359936443124007833</id><published>2011-01-28T07:48:00.000-08:00</published><updated>2012-02-03T11:47:49.156-08:00</updated><title type='text'>New LWUIT website in project Kenai now live</title><content type='html'>The Java.net migration is nearly complete and &lt;a href="http://lwuit.java.net/"&gt;LWUIT&lt;/a&gt; now has a new home page at &lt;a href="http://lwuit.java.net/"&gt;http://lwuit.java.net/&lt;/a&gt;. In the future the current &lt;a href="http://lwuit.dev.java.net/"&gt;http://lwuit.dev.java.net/&lt;/a&gt; address will redirect to the new location but right now it still leads to the old outdated site!&lt;br /&gt;&lt;br /&gt;Upcoming commits and information will all be in the new site, thanks for your patience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-6359936443124007833?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/6359936443124007833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/01/new-lwuit-website-in-project-kenai-now.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6359936443124007833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6359936443124007833'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/01/new-lwuit-website-in-project-kenai-now.html' title='New LWUIT website in project Kenai now live'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5134074752316883265</id><published>2011-01-26T02:23:00.000-08:00</published><updated>2012-02-03T11:47:49.097-08:00</updated><title type='text'>Location Based Cross Platform Game In LWUIT</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_qG7c8W9UfgE/TT_1u_I7lAI/AAAAAAAAF34/8IGRT81LzXY/s1600/device75.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/_qG7c8W9UfgE/TT_1u_I7lAI/AAAAAAAAF34/8IGRT81LzXY/s320/device75.png" width="213" /&gt;&lt;/a&gt;&lt;/div&gt;I have been negligent in posting about cool new LWUIT app's mostly because I have so much to do, however Chen insisted I post about &lt;a href="http://www.tourality.com/"&gt;Tourality&lt;/a&gt; and I agree it is different. Its a location based game written for all platforms with LWUIT, it runs on Android, Blackberry &amp;amp; J2ME. The upcoming iPhone version probably won't be based on LWUIT though ;-)&lt;br /&gt;In the words of its author: "Tourality is a location based scavenger hunt game. Reach geographic     spots in different challenges in your vicinities. Collect gold to     outsmart your co-players with gadgets but beware of thieves. Play     alone or with others in multiplayer games with up to 40 players.     Choose from various game sets in your city. Discover the     action-packed outdoor GPS game and register for free at &lt;a class="moz-txt-link-abbreviated" href="http://www.tourality.com/"&gt;www.tourality.com&lt;/a&gt;.     Supported smartphone platforms include Android, BlackBerry, Nokia,     iPhone (in development)."&lt;br /&gt;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5134074752316883265?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5134074752316883265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/01/location-based-cross-platform-game-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5134074752316883265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5134074752316883265'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/01/location-based-cross-platform-game-in.html' title='Location Based Cross Platform Game In LWUIT'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_qG7c8W9UfgE/TT_1u_I7lAI/AAAAAAAAF34/8IGRT81LzXY/s72-c/device75.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5342536821902337218</id><published>2011-01-24T05:49:00.000-08:00</published><updated>2012-02-03T11:47:49.100-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT GUIBuilder ResourceEditor tutorial Photoshop PSD'/><title type='text'>LWUIT Resource Editor PSD Tutorial Part 2: Converting To LWUIT</title><content type='html'>&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/4oonaEmYsXo" frameborder="0" allowFullScreen&gt;&lt;/iframe&gt;&lt;br /&gt;The second part of the tutorial covers the creation of the first UI skeleton before building the actual application. There are still some missing refinements in this version e.g. I forgot to make the title area transparent which would allow the background texture to peek through.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5342536821902337218?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5342536821902337218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-psd-tutorial-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5342536821902337218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5342536821902337218'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-psd-tutorial-part.html' title='LWUIT Resource Editor PSD Tutorial Part 2: Converting To LWUIT'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/4oonaEmYsXo/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2166567779589647103</id><published>2011-01-19T08:25:00.000-08:00</published><updated>2012-02-03T11:47:48.923-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT Resource Editor Tutorial JavaME J2ME MIDP Android Blackberry RIM Photoshop'/><title type='text'>LWUIT Resource Editor PSD Tutorial Part 1: Introduction</title><content type='html'>&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/8azfm8HNORY" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;I'm starting here a new mini tutorial on taking a PSD and converting it to a LWUIT application, this is a very useful talent for a developer since graphics artists would often produce a Photoshop PSD and expect you to develop from it. &lt;br /&gt;Its also useful since there are many free PSD resources on the web from which you can pick up existing designs, even designs originally designed for web which is exactly what I did... I picked a design from &lt;a href="http://freepsdtheme.com/"&gt;this site&lt;/a&gt; whichI found &lt;a href="http://www.testking.com/techking/roundups/ultimate-collection-of-free-psd-sites/"&gt;here&lt;/a&gt;. There are MANY free design resources you can find and leverage over the web and many Photoshop tutorials, by combining your technical skills with very minimal access to these UI tools you can produce remarkable UI's.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2166567779589647103?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2166567779589647103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-psd-tutorial-part_19.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2166567779589647103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2166567779589647103'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-psd-tutorial-part_19.html' title='LWUIT Resource Editor PSD Tutorial Part 1: Introduction'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/8azfm8HNORY/default.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-7012876286997124247</id><published>2011-01-10T07:56:00.000-08:00</published><updated>2012-02-03T11:47:49.181-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT GUIBuilder ResourceEditor tutorial'/><title type='text'>LWUIT Resource Editor Tutorial Part 10: Taking The Lead</title><content type='html'>&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/mdGHz1wlfrg" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;In this part of the resource editor tutorial covers the Lead Component feature of LWUIT/resource editor which allows creating some elaborate composite components. A composite component is a single component that is assembled of multiple distinct components of its own. E.g. a multiline button, checkbox etc. &lt;br /&gt;In the tutorial I go over a couple of different strategies eventually settling on the lead component strategy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-7012876286997124247?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/7012876286997124247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-tutorial-part-10.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7012876286997124247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/7012876286997124247'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-tutorial-part-10.html' title='LWUIT Resource Editor Tutorial Part 10: Taking The Lead'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/mdGHz1wlfrg/default.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4698177564865348705</id><published>2011-01-03T07:46:00.000-08:00</published><updated>2012-02-03T11:47:49.073-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT GUIBuilder ResourceEditor tutorial Timeline'/><title type='text'>LWUIT Resource Editor Tutorial Part 9: A Splash of Timeline</title><content type='html'>&lt;iframe class="youtube-player" frameborder="0" height="510" src="http://www.youtube.com/embed/KiFQOx3rAu8" title="YouTube video player" type="text/html" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;This time in the resource editor tutorial series I go into the details of creating the simple timeline animation from the previous part. Here I animate the spoon swinging effect to create a compelling (yet cheap in terms of RAM/CPU) effect that's useful for splash screens and form backgrounds.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4698177564865348705?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4698177564865348705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-tutorial-part-9.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4698177564865348705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4698177564865348705'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2011/01/lwuit-resource-editor-tutorial-part-9.html' title='LWUIT Resource Editor Tutorial Part 9: A Splash of Timeline'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/KiFQOx3rAu8/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-698187742006715392</id><published>2010-12-27T03:15:00.000-08:00</published><updated>2012-02-03T11:47:49.171-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT ResourceEditor tutorial'/><title type='text'>LWUIT Resource Editor Tutorial Part 8: Splash Screen Revisited</title><content type='html'>&lt;iframe class="youtube-player" frameborder="0" height="510" src="http://www.youtube.com/embed/0UjcKax0Bgo" title="YouTube video player" type="text/html" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;In this part of the LWUIT resource editor tutorial I go in depth into details of how to create a photoshop like layered UI and make it animate for complex UI constructs that can adapt to different resolutions more effectively.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-698187742006715392?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/698187742006715392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-8.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/698187742006715392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/698187742006715392'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-8.html' title='LWUIT Resource Editor Tutorial Part 8: Splash Screen Revisited'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/0UjcKax0Bgo/default.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2281441371234949396</id><published>2010-12-23T21:02:00.000-08:00</published><updated>2012-02-03T11:47:48.934-08:00</updated><title type='text'>LWUIT mailing list down</title><content type='html'>As part of the changes to the java.net site the users mailing list echo emails are bouncing since they aren't recognized by the spam filter. I hope this problem gets resolved soon, in the meantime please use the &lt;a href="http://forums.java.net/forums/mobile-embedded/lwuit"&gt;LWUIT forum&lt;/a&gt; instead of the mailing list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2281441371234949396?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2281441371234949396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-mailing-list-down.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2281441371234949396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2281441371234949396'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-mailing-list-down.html' title='LWUIT mailing list down'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2420317884688035015</id><published>2010-12-22T03:39:00.000-08:00</published><updated>2012-02-03T11:47:48.949-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Designer LWUITDesigner ResourceEditor l10n i18n localization internationalization tutorial'/><title type='text'>LWUIT Resource Editor Tutorial Part 7: Localization And Internationalization</title><content type='html'>&lt;iframe class="youtube-player" frameborder="0" height="510" src="http://www.youtube.com/embed/87QHEpfE7gY" title="YouTube video player" type="text/html" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;In this part of the resource editor tutorial I cover how a user can localize a LWUIT application especially one built with the UI builder but generally this logic can be applied to any application. I also show off some new UI builder features for localization. Specifically the ability to fetch all the keys from the UI and edit localization data directly in the builder tool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2420317884688035015?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2420317884688035015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-7.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2420317884688035015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2420317884688035015'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-7.html' title='LWUIT Resource Editor Tutorial Part 7: Localization And Internationalization'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/87QHEpfE7gY/default.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2794565160092438743</id><published>2010-12-09T04:09:00.000-08:00</published><updated>2012-02-03T11:47:48.989-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT Blackberry JavaOne'/><title type='text'>A Better Way To Blackberry And Misc Announcements</title><content type='html'>In the past I posted some instructions on how to get LWUIT working on the blackbberry with the Netbeans IDE's using bbant. In my usual fashion these were somewhat complex instructions that caused quite a bit of grief. &lt;br /&gt;There is a better way! Chen came up with it for the 1.4 release, I originally discounted it since I tried something similar which didn't work. I now tried it again and understood that the methodology allows for something much simpler:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install the desired JDE versions (we recommend 5.0 for touch and 4.2 if you need legacy support, notice that you should install both if you want both!).&lt;/li&gt;&lt;li&gt;Install the Netbeans blackberry plugin from &lt;a href="http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=11194"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Select the RIM platform using the standard add platform button (the manage emulators button in the platform tree node in the properties dialog). That's it if you just want to write MIDlets! &lt;/li&gt;&lt;li&gt;To write applications (which is where I failed last time) you need to fix the build-impl.xml which incorrectly generates a MIDlet. To prevent your changes from being overwritten you can just paste them into your standard build.xml. &lt;br /&gt;Open your build-impl.xml (within the nb-project dir) search for the target "create-cod" and copy the entire target to your build.xml. &lt;br /&gt;Replace the &amp;lt;arg value="-midlet"&amp;gt; argument with &amp;lt;arg value="-cldc"&amp;gt;&lt;/li&gt;&lt;/ol&gt;That's much simpler...&lt;br /&gt;&lt;br /&gt;Besides this I was asked to post about a couple of upcoming events specifically &lt;a href="http://www.oracle.com/cn/javaonedevelop/en/javaone-agenda-en-071656.html"&gt;JavaOne Beijing&lt;/a&gt; &amp;amp; Brazil both of which seem to contain LWUIT related talks although I'm not sure who will be giving them. In Beijing specifically there are:&lt;br /&gt;Rich Applications                 and Services for the Mobile Masses &lt;span class="itemId"&gt;(1265)&lt;/span&gt;&lt;br /&gt;&lt;div class="name"&gt;Introducing Java TV Widget Development               &lt;span class="itemId"&gt;(2685)&lt;/span&gt;&lt;/div&gt;&lt;div class="name"&gt;&lt;div class="name"&gt;Writing Stunning Cross-Platform                 Applications Using LWUIT &lt;span class="itemId"&gt;(1245)&lt;/span&gt;&lt;/div&gt;&lt;div class="name"&gt;&lt;/div&gt;&lt;div class="name"&gt;&lt;span class="itemId"&gt;Which are all LWUIT related (the last of which seems to be Chen's J1 session).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="name"&gt;&lt;/div&gt;&lt;div class="name"&gt;&lt;span class="itemId"&gt;If you are a developer in China we would appreciate some application information/screenshots (sent to out lwuit at sun dot com address), there is some push within Oracle for LWUIT in China and our managers have specifically asked for such applications. &amp;nbsp;&lt;/span&gt;             &lt;/div&gt;&lt;span class="itemId"&gt;&amp;nbsp;&lt;/span&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-2794565160092438743?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/2794565160092438743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/12/better-way-to-blackberry-and-misc.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2794565160092438743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/2794565160092438743'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/12/better-way-to-blackberry-and-misc.html' title='A Better Way To Blackberry And Misc Announcements'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-275473946170046535</id><published>2010-12-08T04:07:00.000-08:00</published><updated>2012-02-03T11:47:48.981-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT GUIBuilder ResourceEditor tutorial'/><title type='text'>LWUIT Resource Editor Tutorial Part 6: Lists &amp; Renderers</title><content type='html'>&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/0_Uo8g-7MRU" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;In this part of the tutorial I go over the basic ideas behind lists &amp;amp; cell renderers. Lists in the GUI builder have most of the power that they have within LWUIT proper including renderers and models, with some simplifications in place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-275473946170046535?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/275473946170046535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-6.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/275473946170046535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/275473946170046535'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-6.html' title='LWUIT Resource Editor Tutorial Part 6: Lists &amp;amp; Renderers'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/0_Uo8g-7MRU/default.jpg' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-8620603782889264977</id><published>2010-12-06T05:21:00.000-08:00</published><updated>2012-02-03T11:47:49.227-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT GUIBuilder ResourceEditor tutorial'/><title type='text'>LWUIT Resource Editor Developers Tutorial Part 1</title><content type='html'>&lt;iframe class="youtube-player" frameborder="0" height="510" src="http://www.youtube.com/embed/n1G3fsfrAWY" title="YouTube video player" type="text/html" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;This is a different kind of tutorial for the resource editor designed for developers who want to integrate their code with the resource editor's output. There will be additional parts for this tutorial as well as additional parts to the standard resource editor tutorial.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-8620603782889264977?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/8620603782889264977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-developers.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8620603782889264977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/8620603782889264977'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-developers.html' title='LWUIT Resource Editor Developers Tutorial Part 1'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/n1G3fsfrAWY/default.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-4820296875813465374</id><published>2010-12-01T03:54:00.000-08:00</published><updated>2012-02-03T11:47:49.086-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT ResourceEditor tutorial LWUITDesigner'/><title type='text'>LWUIT Resource Editor Tutorial Part 5: Ratios 3</title><content type='html'>&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/tep6MA0kgwk" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;In this third part of the tutorial I essentially complete the demo (minor tweaks can be made but they should be pretty obvious). I also show off a somewhat modified UI for theme creation in the resource editor that makes it somewhat easier to navigate elaborate themes.&lt;br /&gt;I also demonstrate some of the latest features to drop into the GUI builder such as multi-selection and in place editing.&lt;br /&gt;While this concludes the initial main demo tutorial I still intend to keep up with producing further tutorials for the more advanced functionality as well as for the other parts of the tool such as localization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-4820296875813465374?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/4820296875813465374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4820296875813465374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/4820296875813465374'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/12/lwuit-resource-editor-tutorial-part-5.html' title='LWUIT Resource Editor Tutorial Part 5: Ratios 3'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/tep6MA0kgwk/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-581932586924951991</id><published>2010-11-21T21:09:00.000-08:00</published><updated>2012-02-03T11:47:49.124-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT GUIBuilder ResourceEditor tutorial'/><title type='text'>LWUIT Resource Editor Tutorial Part 4: Ratios 2</title><content type='html'>&lt;iframe class="youtube-player" frameborder="0" height="510" src="http://www.youtube.com/embed/XXiJEoJ21Pc" title="YouTube video player" type="text/html" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;In this second part of the ratios tutorial I go on with customizing the result to produce something that's closer in resemblance to the final result and pretty much finish the first two forms. The last remaining form is the tabs form in the demo.&lt;br /&gt;Notice that the ratio application UI is designed for the iPhone hence it has no focus behavior or anything of that type. A real world application targeting devices that support none-touch input as well would also add selected styles to the mix.&lt;br /&gt;In part 3 I hope to conclude the demo although I might use the ratio demo some more to demonstrate some features of the resource editor such as localization and some more advanced themeing/animations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-581932586924951991?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/581932586924951991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/11/lwuit-resource-editor-tutorial-part-4.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/581932586924951991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/581932586924951991'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/11/lwuit-resource-editor-tutorial-part-4.html' title='LWUIT Resource Editor Tutorial Part 4: Ratios 2'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/XXiJEoJ21Pc/default.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-6168124215961073194</id><published>2010-11-17T03:34:00.000-08:00</published><updated>2012-02-03T11:47:49.142-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Designer LWUITDesigner'/><title type='text'>LWUIT Resource Editor Tutorial Part 3: Ratios 1</title><content type='html'>&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/oOeWaMiIL-8" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;In this part of the LWUIT resource editor tutorial I demonstrate how I created the Ratio's demo based on Michael Ruhlman's excellent Ratio iPhone/Android applications (more info at &lt;a href="http://ruhlman.com/"&gt;http://ruhlman.com/&lt;/a&gt;). &lt;br /&gt;This demo shows how one can take a real world application and replicate its UI/functionality rapidly in LWUIT to get it running on all devices.&lt;br /&gt;This tutorial is divided into several parts due to the video length&amp;nbsp; limitation of Youtube and to make it easier to watch in parts.&lt;br /&gt;I'm working on transcribing the videos since my accent is problematic for many people, it takes me a very long time to transcribe though so if anyone can do this fast it would be helpful (the automatic tools don't understand me either...).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-6168124215961073194?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/6168124215961073194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/11/lwuit-resource-editor-tutorial-part-3.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6168124215961073194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/6168124215961073194'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/11/lwuit-resource-editor-tutorial-part-3.html' title='LWUIT Resource Editor Tutorial Part 3: Ratios 1'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/oOeWaMiIL-8/default.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1346463316226337300</id><published>2010-11-10T04:06:00.000-08:00</published><updated>2012-02-03T11:47:48.902-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT ResourceEditor tutorial'/><title type='text'>Second Part of The New Resource Editor Tutorial</title><content type='html'>So far so good, another part of the resource editor tutorial has made its way up to youtube.... In this part I try to take a step back and cover some basics of what is a theme and how to apply it, I go over some of the basics of what is a selector and how to determine a value for it.&lt;br /&gt;&lt;br /&gt;&lt;iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="510" src="http://www.youtube.com/embed/t8MRktBRtEE" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1346463316226337300?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1346463316226337300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/11/second-part-of-new-resource-editor.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1346463316226337300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1346463316226337300'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/11/second-part-of-new-resource-editor.html' title='Second Part of The New Resource Editor Tutorial'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/t8MRktBRtEE/default.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-1422003483263277378</id><published>2010-11-04T05:06:00.000-07:00</published><updated>2012-02-03T11:47:48.914-08:00</updated><title type='text'>New URL for the LWUIT Forums</title><content type='html'>The &lt;a href="http://www.java.net/forums/mobile-embedded/lwuit"&gt;LWUIT forum&lt;/a&gt; was down for a while this week and went up with past links being broken.&lt;br /&gt;All the messages are still there under the newer version of the forums, you can find the new &lt;a href="http://www.java.net/forums/mobile-embedded/lwuit"&gt;forum here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-1422003483263277378?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/1422003483263277378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/11/new-url-for-lwuit-forums.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1422003483263277378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/1422003483263277378'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/11/new-url-for-lwuit-forums.html' title='New URL for the LWUIT Forums'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-9017263224875329065</id><published>2010-11-03T03:50:00.000-07:00</published><updated>2012-02-03T11:47:49.233-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT ResourceEditor tutorial'/><title type='text'>New Resource Editor Tutorial Part 1</title><content type='html'>&lt;object align="right" height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/uwZ98s4iiRU?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/uwZ98s4iiRU?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;I hope to make this a weekly tradition for the next couple of months until we have a respectable set of videos covering all the features of the new resource editor in detail. The first video is just a warmup showing off how quickly one can create a hello world UI with the resource editor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-9017263224875329065?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/9017263224875329065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/11/new-resource-editor-tutorial-part-1.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9017263224875329065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/9017263224875329065'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/11/new-resource-editor-tutorial-part-1.html' title='New Resource Editor Tutorial Part 1'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-5888570254415611111</id><published>2010-10-23T03:33:00.000-07:00</published><updated>2012-02-03T11:47:49.133-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT J2ME JavaME Style Compatibility ResourceEditor'/><title type='text'>Tips About Compatibility Issues With My Latest Commits</title><content type='html'>I just committed some major refactoring to the LWUIT code base the other day, I changed the way Dialogs work so the style of the Dialog UIID actually surrounds the "dialog" as one would expect... This works really well but is highly incompatible since the change required quite a bit of hacks. I also moved the alignment attribute into the Style class which doesn't seem like something that would break compatibility but it does.&lt;br /&gt;&lt;br /&gt;If you are running into problems with your existing code try the following:&lt;br /&gt;&lt;br /&gt;You can use the old Dialog logic by invoking Dialog.setDialogTitleCompatibilityMode(true);&lt;br /&gt;This is mostly intended as an intermediate solution until you can fix your theme/code.&lt;br /&gt;If you used Dialog style manipulations by changing the Dialog's content pane this will no longer work as expected! You will need to use the Dialog.setDialogStyle/UIID() methods instead.&lt;br /&gt;&lt;br /&gt;If you find that alignment is broken for some use cases its usually triggered by changing the style after setting alignment. The solutions for this are to either define the alignment in the theme or just move the alignment setting code to a point after you change the style e.g.:&lt;br /&gt;cmp.setAlignment(LEFT);&lt;br /&gt;cmp.setUIID("SomethingElse");&lt;br /&gt;&lt;br /&gt;Will replace the style component in the component and break its alignment, you need to make sure this doesn't happen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4691915549420037229-5888570254415611111?l=lwuit.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lwuit.blogspot.com/feeds/5888570254415611111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://lwuit.blogspot.com/2010/10/tips-about-compatibility-issues-with-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5888570254415611111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4691915549420037229/posts/default/5888570254415611111'/><link rel='alternate' type='text/html' href='http://lwuit.blogspot.com/2010/10/tips-about-compatibility-issues-with-my.html' title='Tips About Compatibility Issues With My Latest Commits'/><author><name>Shai Almog</name><uri>http://www.blogger.com/profile/00438710609860092709</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4691915549420037229.post-2288613642086065023</id><published>2010-10-21T04:26:00.000-07:00</published><updated>2012-02-03T11:47:48.941-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LWUIT GUIBuilder'/><title type='text'>The UI Builder Class: How to actually use the LWUIT GUI builder</title><content type='html'>In my previous &lt;a href="http://lwuit.blogspot.com/2010/10/new-lwuit-gui-builder-now-live.html"&gt;GUI Builder&lt;/a&gt; post I was a bit vague mostly because I was doing it in a rush in a day of some serious major commits to LWUIT's SVN, I didn't have that much time to post and when I do get a chance to write something there is so much new stuff I'm just overwhelmed with what to write about... (FYI allot more is coming really soon!).&lt;br /&gt;&lt;br /&gt;Please notice that when you use the LWUIT GUI builder and its related API's that its alpha level software likely to break and fail in interesting ways. I did my best to prevent a resource file corruption but I strongly suggest to constantly backup the resource file while working (and please file issues if you run into them!).&lt;br /&gt;The UIBuilder API is also in alpha form and might change significantly although I tend to believe we have the right direction there...&lt;br /&gt;&lt;br /&gt;The premise is this: the designer creates a UI version and names GUI components, he can create commands as well including navigation commands, exit, minimize. He can also define a long running command which will by default trigger a thread to execute...&lt;br /&gt;&lt;br /&gt;All UI elements can be loaded using the UIBuilder class. Why not just use the Resources API?&lt;br /&gt;Since Resources is essential for using LWUIT, adding the UIBuilder as an import would cause any application (even those that don't use the UIBuilder) to increase in size! We don't want people who aren't using the feature to pay the penalty for its existence!&lt;br /&gt;&lt;br /&gt;The UI Builder is designed for use as a state machine carrying out the current state of the application so when any event occurs a subclass of the UIBuilder can just process it. The simplest way and most robust way for changes is to use the resource editor to generate some code for you (yes I know its not a code generation tool but there is a hack...). The code you need to write to process the UI includes some boilerplate code which is pretty mundane for processing commands based on id's or processing an event from a component, to simplify this process I added to the resource editor two menu items, the firs is simpler: "Help-&amp;gt;Show Source For Using". The second is far more elaborate and I will try to go over it and its output bellow: "MIDlet-&amp;gt;Generate UI State Machine".&lt;br /&gt;&lt;br /&gt;When running the Generate UI state machine menn option in a project with UI builder content it prompts you for a directory/file name for the output. Just give it a new file name in your project directory and it will create a UIBuilder subclass containing most of what you need...&lt;br /&gt;&lt;b&gt;The trick is not to touch that code! DO NOT CHANGE THAT CODE!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Sure you can change it and everything will be just fine, however it you will make changes to the GUI regenerating that file will obviously loose all those changes which is not something you want!&lt;br /&gt;To solve it you need to subclass the generated class rather than subclass UIBuilder and just override the appropriate methods (some might even be abstract for your convenience), then if a UI changes you can safely overwrite the base class since you didn't change anything there...&lt;br /&gt;&lt;br /&gt;Just so we are clear on the subject, after generating the code I can run the code by just using this and nothing else:&lt;br /&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;import javax.microedition.midlet.*;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;import com.sun.lwuit.*;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;public&lt;/b&gt; &lt;b&gt;class&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;RatioMIDlet&lt;/span&gt; &lt;b&gt;extends&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;MIDlet&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;b&gt;void&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;startApp&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #2040a0;"&gt;Display&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;init&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;this&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;new&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;StateMachine&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"/ratios.res"&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;b&gt;void&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;pauseApp&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;b&gt;void&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;destroyApp&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;unconditional&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Obviously for a real world example that actually does something I would want to subclass and override methods in StateMachine.java. Lets look at the generated code which will help us understand both how to use the UIBuilder ourselves and how to subclass the code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;import com.sun.lwuit.*;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;import com.sun.lwuit.util.*;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;import com.sun.lwuit.events.*;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;import com.sun.lwuit.plaf.*;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;public&lt;/b&gt; &lt;b&gt;class&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;StateMachine&lt;/span&gt; &lt;b&gt;extends&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;UIBuilder&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;StateMachine&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;Resources&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;String&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;, &lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;loadTheme&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #2040a0;"&gt;UIBuilder&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;registerCustomComponent&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"HTMLComponent"&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;com&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;sun&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;lwuit&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;html&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;HTMLComponent&lt;/span&gt;.&lt;b&gt;class&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;res&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;!&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;b&gt;null&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #2040a0;"&gt;setResourceFilePath&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #2040a0;"&gt;Form&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;f&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;Form&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;createContainer&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;, &lt;span style="color: green;"&gt;"Splash"&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #2040a0;"&gt;f&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;show&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt; &lt;b&gt;else&lt;/b&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #2040a0;"&gt;Form&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;f&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;Form&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;createContainer&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;, &lt;span style="color: green;"&gt;"Splash"&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #2040a0;"&gt;f&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;show&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;loadTheme&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;res&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;b&gt;null&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;try&lt;/b&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #2040a0;"&gt;res&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;Resources&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;open&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt; &lt;b&gt;catch&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;java&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;io&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;IOException&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;err&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;err&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;printStackTrace&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #2040a0;"&gt;UIManager&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getInstance&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;setThemeProps&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getTheme&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getThemeResourceNames&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;[&lt;/b&gt;&lt;/span&gt;&lt;span style="color: red;"&gt;0&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;]&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;StateMachine&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;String&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;this&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;null&lt;/b&gt;, &lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;, &lt;b&gt;true&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;StateMachine&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;Resources&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;this&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;, &lt;b&gt;null&lt;/b&gt;, &lt;b&gt;true&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;StateMachine&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;String&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;, &lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;loadTheme&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;this&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;b&gt;null&lt;/b&gt;, &lt;span style="color: #2040a0;"&gt;resPath&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;loadTheme&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;StateMachine&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;Resources&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;, &lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;loadTheme&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;this&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;res&lt;/span&gt;, &lt;b&gt;null&lt;/b&gt;, &lt;span style="color: #2040a0;"&gt;loadTheme&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;b&gt;static&lt;/b&gt; &lt;b&gt;final&lt;/b&gt; &lt;b&gt;int&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_BREAD_BACK&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;5&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;b&gt;static&lt;/b&gt; &lt;b&gt;final&lt;/b&gt; &lt;b&gt;int&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_DOUGHS_BREAD&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;4&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;b&gt;static&lt;/b&gt; &lt;b&gt;final&lt;/b&gt; &lt;b&gt;int&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_DOUGHS_BACK&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;3&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;b&gt;public&lt;/b&gt; &lt;b&gt;static&lt;/b&gt; &lt;b&gt;final&lt;/b&gt; &lt;b&gt;int&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_MAINSCREEN_DOUGHS&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;=&lt;/span&gt; &lt;span style="color: red;"&gt;2&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;protected&lt;/b&gt; &lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;onBreadBack&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;return&lt;/b&gt; &lt;b&gt;false&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;protected&lt;/b&gt; &lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;onDoughsBread&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;return&lt;/b&gt; &lt;b&gt;false&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;protected&lt;/b&gt; &lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;onDoughsBack&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;return&lt;/b&gt; &lt;b&gt;false&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;protected&lt;/b&gt; &lt;b&gt;boolean&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;onMainscreenDoughs&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;return&lt;/b&gt; &lt;b&gt;false&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;protected&lt;/b&gt; &lt;b&gt;void&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;processCommand&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;ActionEvent&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;ev&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;Command&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;cmd&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;switch&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;cmd&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getId&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;case&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_BREAD_BACK&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;:&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;onBreadBack&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #2040a0;"&gt;ev&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;consume&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;b&gt;case&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_DOUGHS_BREAD&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;:&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;onDoughsBread&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #2040a0;"&gt;ev&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;consume&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;b&gt;case&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_DOUGHS_BACK&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;:&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;onDoughsBack&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #2040a0;"&gt;ev&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;consume&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;b&gt;case&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;COMMAND_MAINSCREEN_DOUGHS&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;:&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;onMainscreenDoughs&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #2040a0;"&gt;ev&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;consume&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;b&gt;protected&lt;/b&gt; &lt;b&gt;void&lt;/b&gt; &lt;span style="color: #2040a0;"&gt;handleComponentAction&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;Component&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;ActionEvent&lt;/span&gt; &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getComponentForm&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Bread"&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"TextField1"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onTextfield1Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"ComboBox1"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onCombobox1Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"TextField11"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onTextfield11Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"ComboBox11"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onCombobox11Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"TextField111"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onTextfield111Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"ComboBox111"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onCombobox111Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"TextField12"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onTextfield12Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"ComboBox12"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onCombobox12Action&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;        &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getComponentForm&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"MainScreen"&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Doughs"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onDoughsAction&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Batters"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onBattersAction&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Custards"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onCustardsAction&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Fat-Based Sauces"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onFatBasedSaucesAction&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Stocks &amp;amp; Thickeners"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt; &lt;span style="color: #4444ff;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #2040a0;"&gt;onStocksThickenersAction&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;, &lt;span style="color: #2040a0;"&gt;event&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;                &lt;b&gt;return&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #4444ff;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;            &lt;b&gt;if&lt;/b&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;"Meat Related Ratios"&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;equals&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #2040a0;"&gt;c&lt;/span&gt;.&lt;span style="color: #2040a0;"&gt;getName&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #4444ff;"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/span&
