TOC PREV NEXT INDEX



Create a new Application


You will now create a new MIDlet (which will become your text file browser). A MIDlet is a Java application which can run on a number of small devices, including the Palm OS Platform. In the IDE, you see on the left the Project Tree, which has three sections. The first is called "Project Groups", and contains a list of group names. Each of these items represents a group of files which will appear in the box on the right when selected. For example, if you chose 'Java Source Files', all of the Java source files would appear in the box on the right.

  1. Choose the first item in Project Groups, labeled 'Composer Files'.
  2. To see what our tutorial will look like when finished, double click on FinishedBrowser.Midlet.

    Three windows appear. One of these will contain a picture of a Palm OS Platform based handheld computer. Running in it will be the text file browser. The browser has a place where you can enter the url of a text file, a "load" button, and an area where the loaded text file will be displayed. Note that the browser will not interpret HTML tags.
  3. When you are finished, choose 'Exit' from the File menu of the first window, titled 'MIDlet Composer'. Press None when asked if you would like to save any changes.
  4. In the IDE, choose 'Midlet' from the Create menu. This creates a new MIDlet in the current project.

    A new Icon appears in the 'Composer Files' group with a name similar to Untitled0.Midlet.
  5. Click this new icon once to select it. (It will become highlighted.)
  6. From the Edit menu, choose Rename selection. A text field will appear to the right of the icon. Replace the old name with 'text browser'. Click the mouse anywhere else in the right hand window to accept the change. If you don't specify the '.Midlet' extension, Simplicity will add it for you. Simplicity will also modify the spacing and capitalization to conform to Java naming conventions.
  7. Double click the new 'TextBrowser.Midlet' icon to open the Simplicity Composer.

You have now created a new MIDlet, and have loaded it into the Simplicity Composer. You should see three new Windows on the screen. They are the Composer window, the Mobile Devices Palette, and a window titled MID Emulator which contains a picture of a Palm OS Platform based handheld computer. This last window is the Emulator where you will interact with the program you are creating.

The composer window is the place where you will set up all of the parts of your MIDlet. It is also where you will be able to supply all the code that your program will need.

On the left side of the composer window is the Parts tree. This is a tree listing of all of the MIDlets currently open as well as their contents. This area will be where you will drag new parts of your MIDlets, and where you can rearrange the order of the parts of your MIDlet. It also provides a quick way to switch from one part to another in your MIDlet. The different nodes on the tree may be expanded or collapsed to show the parts of the MIDlet which you are currently working on.

On the right side of the composer window is the title, contextual help, and Property sheet for the selected part. The Property sheet will be used to change the initial settings of the parts in your MIDlet.

The third window, the Mobile Devices Palette, contains icons of the parts which you will be adding to your MIDlet.


Data Representations, Inc.
http://www.datarepresentations.com
support@datarepresentations.com
sales@datarepresentations.com
TOC PREV NEXT INDEX