![]() |
![]() |
![]() |
![]() |
Create a new Application
You will now create a new Spotlet (which will become your tip calculator). A Spotlet is a Java application which can run on 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.
- Choose the first item in Project Groups, labeled 'Composer Files'.
- To see what our tutorial will look like when finished, double click on Finished.Spotlet.
Three windows appear. One of these will contain a picture of a Palm OS Platform based handheld computer. Running in it will be the simple tip calculator. It will have two spaces where you can enter text, labeled 'Bill Amount $:' and 'Percentage:'. It will also have a button labeled 'compute tip'. Click to the right of 'Bill Amount $:' so that the cursor starts to flash. You can then type a number into the TextField. Click on 'Percentage' and type another number. Finally, press the 'compute tip' button to see the amount of the tip.- When you are finished, choose Exit from the File menu of the first window, titled 'Simplicity Composer'. Press No when asked if you would like to save any changes.
- In the IDE, choose 'Spotlet' from the Create menu. This creates a new Spotlet in the current project. (You can also press the 'Create a Spotlet' button on the button bar. It is the fourth button from the left in the IDE.)
A new Icon appears in the 'Composer Files' group with a name similar to Untitled0.Spotlet.- Click this new icon once to select it. (It will become highlighted.)
- From the Edit menu, choose Rename selection. A text field will appear to the right of the icon. Replace the old name with 'tip calculator'. Click the mouse anywhere else in the right hand window to accept the change. If you don't specify the '.Spotlet' extension, Simplicity will add it for you. Simplicity will also modify the spacing and capitalization to conform to Java naming conventions.
- Double click the new 'TipCalculator.Spotlet' icon to open the Simplicity Composer.
You have now created a new Spotlet, and have loaded it into the Simplicity Composer. You should see three new Windows on the screen. They are the Composer window, the Object Palette, and a window which contains a Palm OS Platform based handheld computer. This last window is the Palm OS Platform Emulator.
The composer window is the place where you will set up all of the properties of the graphical parts of your program. It is also where you will be able to supply all the code that your program will need.
Toward the top of the Composer window is a choice box. This is the Part List. If you select it, you will see that there is currently only one item in it called TipCalculator. This refers to the Spotlet that will become your application.
The bottom portion of the Composer window has a seven page notebook. The first page, called 'Spotlet', has the properties that are specific to a Spotlet application running on the Palm OS Platform. There is also a checkbox which enables you to edit the location of parts in your GUI using your mouse.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |