Running LWUIT example applications with NetBeans

This topic provides step-by-step instructions on how to build and run example applications delivered with the LWUIT for Series 40 plug-in on NetBeans IDE:
  1. 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.

  2. Right-click on the LWUITDemo project and open Properties.

  3. 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.

  4. 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.

  5. Set LWUITDemo as the main project. Right-click on the project and select Clean & Build.

  6. Run the application on the emulator

  7. 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.