Creating the User Interface

Goal: Create the user interface for the SUP101Sample application.

Prerequisites
Obtain the text files that contain the code snippets you need to build the user interface from the SUP_BB_Custom_Dev_Tutorial_code.zip file. The code snippets are used to create these classes: CustomerSample, CustomerList, and CustomerSampleScreen.
Task
  1. In Package Explorer, right-click SUP101Sample, and select New > Package.
  2. For the Name, enter com.sybase.sup.samples.objectapi and click Finish.
  3. Right-click the com.sybase.sup.samples.objectapi package and select New > Class.
  4. For the Name, enter CustomerSample, and click Finish.

    bb_new_java_class
  5. In the CustomerSample.java file, copy and paste the code from the provided CustomerSample.java text file.
    Overwrite any existing contents. The provided code creates the main Customer application.
    BlackBerry App Dev CustomerSample.java
  6. Save the CustomerSample.java file.
    The package contains errors until you create the two other classes. Ignore these errors and continue.
  7. Right-click the com.sybase.sup.samples.objectapi package, and select New > Class.
  8. For Name, enter CustomerList, and click Finish.
  9. In the CustomerList.java file, copy and paste the code from the provided CustomerList.java text file.
    Overwrite any existing contents.
    BlackBerry App Dev CustomerList.java
  10. Save the CustomerList.java file.
    Ignore the errors, which resolve once you create the next class.
  11. Right-click the com.sybase.sup.samples.objectapi package, and select New > Class.
  12. For Name, enter CustomerSampleScreen, and click Finish.
  13. In the CustomerSampleScreen.java file, copy and paste the code from the provided CustomerSampleScreen.java text file.
    Overwrite any existing contents.
    BlackBerry App Dev CustomerSampleScreen.java
  14. Save the CustomerSampleScreen.java file.