Using custom components in NetBeans’ Mobile Flow Designer
If you have ever programmed a bit more complicated mobile applications you have noticed that you need to make your own custom UI controls. The J2ME 2.0 brought few additional controls to the default palette but still one needed to make their own components for their killer applications. Fortunately the NetBeans IDE’s new Flow Designer supports custom components as they are so common in average J2ME project. I have for example used a new custom component, an arrangeable list, in the Groceries application’s new version (v1.1).
Here is an example of such a project that includes two custom components, the splash screen and arrangeable list. They can be added to Flow Designer’s palette with few button clicks (Customize > Add from project > … ) And after you have added your components to the palette you can easily just drag and drop them to your application’s flow and add Commands etc. to them. I was surprised as you are even able to modify the constructor’s parameters with the Flow Designer as this allows you to make more advanced components.
If you want to take a closer look at the Flow Designer please download the latest NetBeans IDE and NetBeans Mobility Pack. You can also download and inspect my Groceries midlet project that includes few custom controls.
September 14th, 2005 at 18:33
new 5.0 relese will contain a few custom components (table, wait, splash) with renderers. And one more important improvement - guarded block remains but now it is fragmented, leaving empty space for pre- and post- hooks so you can type the custom code directly into the editor and not in a special dialog. I really like it. It is not full two-way editing but on the other hand it is hard to break. See:
http://mryzl.czweb.org/netbeans/nb5.jpg
September 14th, 2005 at 20:17
That sounds like a very good improvement. I have several times cursed the special dialogs as they didn’t provide full code completion on the 4.1.
I have also seen some screenshots of the 5.0’s mobile flow designer and it seems to have been greatly improved as user can drag and move the command objects/transition lines to make the flow more readable and clearer. Can’t wait to get my hand dirty with the 5.0 release :)