Porting app from LWUIT to CodenameOne

Tag: lwuit , porting , codenameone Author: sunnyfj23 Date: 2012-03-14

I have 3 apps developed in LWUIT using the Resource editor and adding more functionallity with Netbeans. I want to port them to codenameone. What is the best way to do that?
I see that the navite Componentsfrom LWUIT have an equivalent Componentin codenameone, but J2ME methods and classes , now have to be ported to J2SE, is that right?
The methods in the StateMachineBase have changed too. showForm() for example, doesn't exist now.What further changes are in StateMachineBase?


Best Answer

Start by creating a new Codename One project then just copy your source code/resource files and fix the import statements.

You can't use the MIDP API's anymore (and you can't use J2SE either), there are new API's and a new lifecycle object which you can use for pretty much everything. showForm does exist and wasn't modified, I'm not exactly sure why you didn't find it.

Generally Codename One is much simpler since it doesn't have the project hierarchy issue and you don't need to deal with MIDP/RIM/Android differences. Its all handled for you.


thanks Shai!!!!