Running demonstration MIDlets on a mobile phone emulator.
In this Activity you will use the sample MIDlets provided with NetBeans.
If you have some other Wireless Toolkit installed, such as the Sun Wireless Toolkit, you may need to
In NetBeans select File|New Project... and the New Project wizard will appear. Under Categories: expand Samples and then select Java ME (MIDP), as shown below.

Click on Sun Samples - Demos and then Next>.
The wizard should now look like this. Make sure that the Project Location: is correct. It should be C:\M257\Unit 10 if you have used the same folder structure as us.

Click Finish and the new project will appear in the Projects window. (You may need to expand it to see the packages it contains.)

As you see, NetBeans uses a special icon for mobile projects (highlighted above). Make sure that SunSamples-Demos1 is set as the main project, then select Run Main Project. Compiling the program may take some time, but after a while you will be presented with an emulation of a mobile phone.
(You can choose different emulators in the project properties dialogue. The one above is the DefaultFxPhone1.) This has the same functionality as if the phone were real (except you cannot make calls with it of course!) You 'press' buttons by clicking on them with the mouse pointer. Alternatively you can use your computer keyboard.
On the screen of the phone a suite of MIDlets is displayed. To launch a highlighted MIDlet you can
The term soft key will be explained further in the Unit, but essentially it is a key to which a variety of actions can be associated. The text above the soft key at any given time indicates the current semantics of pressing the related soft key.
By pressing the 'soft key' associated with Exit you can return to the list of MIDlets and try another. By pressing the off button of the phone, you can close the emulation and return to the NetBeans.
Follow the same steps as those above to try out some other MIDP samples. Please feel free to investigate whichever MIDlets take your fancy!