J2ME Polish 1.3: FramedForm

June 5, 2006 · Print This Article

What could be an incredibly useful feature is marred by bugs in the beta release of Polish 1.3. The concept behind the FramedForm class is similar to the Border Layout in Java Swing. You can append items to the FramedForm body, and designate other items to be anchored at the frame top, bottom, left, or right.

For example, you can display an anchored query as search results are scrolled. Or you can display an anchored search box while the rest of the screen content is scrolled. Maybe even use a ChoiceGroup to dynamically filter or change the content on the screen.

Using the FramedForm is as easy as building any MIDP form.

FramedForm myForm = new FramedForm(”Search Results”);
StringItem item = new StringItem(”You’d Prefer an Astronaut”, null);
/* more items */
TextField search = new TextField(”", “”, 25, TextField.ANY);
myForm.append(item);
/* repeat */
myForm.append(Graphics.TOP, search);

But the results are less than spectacular on the beta release. Anchoring anything on the bottom frame doesn’t work. Anchoring on the top frame suffers from frame boundaries not being respected, and styles not being properly applied.

Even with these current bugs, I imagine there’s still some utility to be had by using this class, if for nothing else than layout help. For example, you could add an image or icon to the left or right frame of a screen, and use Polish styles to sufficiently pad that edge of the screen, perhaps to be used in an image viewing application or to create a graphical navigation menu of some sort.

I love the concept behind the framed form, so I’m hopeful that future releases of J2ME Polish will address some of these issues. In the meantime, I’ll continue looking for workarounds and ways to use the current functionality.

My overall experience using Polish in this test project has been similar to using this framed form. On paper, it sounds like a major boon to productivity and compatibility, and on the whole, I can’t imagine starting a product without Polish as the build tool, because it largely comes through on its promises. But I have been mildly disappointed with execution. I find myself wishing for fewer features, but features that work smoothly; versus a wealth of features, and finding annoyances in some of them.

Comments

One Response to “J2ME Polish 1.3: FramedForm”

  1. Rich Livingstone on January 28th, 2007 6:49 am

    Yeah, I can agree with this. J2ME V2 beta 3 has more bugs than the last 1.3 beta above, in the core areas, anyhow. It’s a great product on the whole but needs a fair bit of rounding out and a bit more responsiveness from the developers (though as it’s open-source, this is a bit optimistic perhaps). Some of the irritating bugs in 1.3 were indeed fixed (like choice group scrolling) but in turn, there seem to be new problems in the area of Polish-defined menus, handling of pointer events and the Polish alert class. Ho hum.

Got something to say?