Opening J2me LWUIT Project using Netbeans

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.

J2ME LWUIT PROGRAMMING

HELLO WORLD USING J2ME LWUIT

Without much waste of time i’m gonna give a brief introduction to j2me lwuit programming.Just like in java where we have got libraries such as Swing and AWT, j2me has got libraries too which are more similar to swing in Java,the most popular is called the LWUIT(Light weight user Interface Toolkit).It is a widget that will help you mobile application developer to develop attractive applications other than the basic j2me interface which has got many limitation when it comes to designing beautiful looking apps.LWUIT is very simple for a determined programmer and here a demonstration of a hello world app.

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

import com.sun.lwuit.*;
import javax.microedition.midlet.*;

/**
* @author Karis
*/
public class HelloMIDlet extends MIDlet {

public Form form;

public void startApp() {
Display.init(this);

form=new Form(“HELLO WORLD”);

form.show();

}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}
}

================================

Screenshot of the above code snippet:

In case any of you have got questions on LWUIT programming do post your question and be sure the experts will take you through it within the  shortest time possible.Thank you guys

Statistical data of people viewing this site now:
Map