Download the LWUIT JAR file to your computer.
Create a new project. In NetBeans, choose File > New Project… from the menu. Choose the Mobility category and MIDP Application type. Press Next >.
Now enter a name for the project. Here I’ve used HelloLWUIT. Choose a location and make sure to uncheck Create Hello MIDlet. Press Next >.
Finally, choose either Sun Java(TM) Wireless Toolkit 2.5.2 for CLDC or Sprint Wireless Toolkit 3.2 Powered by Sun Java Technology (what a mouthful!) for the Emulator Platform. Choose your favorite device. Press Finish to create the project.
Add LWUIT to the project. In the project you just created is an item called Resources. If you don’t see this, make sure you are looking at the Projects view, which is accessible from Window > Projects in the menu.
Right-click on Resources and choose Add Jar/Zip Navigate to the LWUIT JAR file. When you are finished, you should see the JAR file in the Resources section when you expand it.
Write a simple application. Right-click on your project and choose New > MIDlet from the menu. Enter a name, like HelloLWUITMIDlet, and press Finish.
Here is the source code for a simple LWUIT MIDlet. Type it in or copy and paste it.

