Completing the program
Looking back at the IDE, you should see the ToDo.Midlet file in the 'Composer Files' group.
- Choose the 'Java Source Files' group. You should see a new file called ToDo.java. This is the java code which has been generated by the Composer. (If you are using the demonstration version of Simplicity, the composer will not create the Java source file. Use Finished.java instead for the rest of the tutorial.) If desired, you may double-click the ToDo.java icon. This will open Simplicity's Java Source Editor with the ToDo.java file loaded.
Now we want to compile and test the program.
- Bring up the pop-up menu for the ToDo.java icon. This is usually done by clicking the right mouse button on the icon, but this behavior varies on different operating systems. You can also show the pop-up menu by holding the shift key and clicking the icon with the mouse.
- Choose 'Compile' from the pop-up menu. Simplicity now invokes your Java compiler to turn the Java source code which you just created into an executable file, called a Java class file.
- In the Project Tree, choose 'Java Class Files'. You should see an icon named ToDo.class. This file is your executable program.
- Right click ToDo.class and choose Run. This will open your MIDlet in a new MID Emulator.
| Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |