In NetBeans
IDE, from the File menu, select Open Project and select an example application, for example, LWUITDemo
project in ...\Nokia\Devices\Nokia_SDK_2_0_Java\plugins\lwuit\examples
.
Right-click on the LWUITDemo project and open Properties.
Go to Build > Libraries & Resources. Add the S40-with-themes.jar
file and uncheck the Package checkbox.
Note: You will get compilation errors if it is checked.
Under Platform, select the SDK and check the following Optional Packages:
Nokia User Interface 1.6
Nokia touch UI - Gesture APIs 1.6
Scalable 2D Vector Graphics
Mobile Media API 1.0
Mobile 3D Graphics Optional Package 1.1
Note: Other packages may also be selected but you do not have to uncheck them.
Set LWUITDemo
as the main project. Right-click on the project
and select Clean & Build.
Run the application on the emulator
To run the application
on the device, use obfuscation: Select LWUITDemo
,
open Properties > Build > Obfuscation and drag
the slider to the right most position (High). This makes the application
size smaller so that it can be run on a real device.