Improve your contact center performance. See how you can make a difference.
Watch Now
Engage and build your ICT audience with CIOL online advertising.
Know more
Getting Started With this month's PCQ Professional DVD we are distributing LWUIT, as well as the latest NetBeans version 6.1, which has support for mobility programming. Extract the contents from the LWUIT zipped file into a folder and then start the NetBeans IDE to start a new mobility project.
In NetBeans, create a new project through File > New Project, and there select Mobility option under categories and MIDP application from Projects pane and click Next button. Name the project as FirstLWUIT and uncheck the option to create Hello MIDlet and click Next. Then on the following screen, select the Emulator Platform as Sun Wireless Toolkit 2.5.2 for CLDC and choose the device of your choice and click on Finish. This creates the project skeleton.
While creating the project, for Device Emulator Platform we can select Sun Wireless Toolkit as it comes default with NerBeans, while other Emulators can be added. through Project properties
We now have to add the LWUIT library to the project. From the Projects View, expand the project FirstLWUIT and then right click on Resources and select Add Jar/Zip option. On the Add Jar or Zip dialog window, browse to the location where you extracted LWUIT, select the LWUIT.jar file and select Open button. Now the LWUIT classes are available for this project and we can implement and use them to create interfaces.
First LWUIT MIDlet To create the first MIDlet for our project, right click on the project package and select New > MIDlet. Name the MIDlet as FirstMidlet and click Finish. This creates a body of the MIDlet. Now we can implement LWUIT classes to create user interfaces. The Display class of LWUIT manages the graphics rendering and handling of events. Most of the components are like Swing in implementation and developers familiar with Swing will find it easier to get familiar with LWUIT.
<< PREVIOUS NEXT>>