Adding Clear command

Add Clear command, to return from search to the contact list, at the end of startApp().

To create a new Command instance and reset the search term use the following code:

private Command clearCommand;

    public void startApp() {

        ...

        populateContactList(searchField.getText());
        clearCommand = new Command("Clear") {
            public void actionPerformed(ActionEvent evt) {
                searchField.setText("");
                populateContactList("");
            }
        };
        form.addCommand(clearCommand);
   }  
Note:

When a command is added to the form without setting it as the default, the Options menu will appear and the command will be placed in the Options menu.