Creating a Screen Class

Use the Custom Code Screen Properties dialog to create a new screen class.

  1. In the Flow Design page, double-click the Custom Code screen.
  2. In the Screen Design page, right-click the device icon in the screen and select Create Screen Class. You can also click Create Screen Class in the Screen Design Properties view when the custom code screen is selected.
  3. In the New Java Class wizard, enter:
    Option Description
    Source Folder Click Browse to locate the source folder for the Java class.
    Package Click Browse to locate the Package for the new Java class.
    Note: It is recommended that you specify the package and do not leave this field blank as the JDK 1.4 Java class in the default package cannot be resolved in other packages.
    Name Enter the name of the Java class.
    Superclass
    1. Click Browse.
    2. In the Superclass Selection dialog, enter:
      • Choose a Type
      • Matching Items
    3. Click OK.
    Interfaces
    1. Click Add.
    2. In the Implemented Interfaces Selection dialog, enter:
      • Choose Interfaces
      • Matching Items
    3. Click OK.

    To remove an interface:


    1. In the Implemented Interfaces Selection dialog, select an interface.
    2. Click Remove.
    Which Method Stubs Would You Like to Create
    • Public Static Void Main
    • Constructors From Superclass
    • Inherited Abstract Methods
    Do You Want to Add Comments Select Generate Comments if you want to add comments.
    Note: If you set the Java project compiler compliance level to later than 1.4, you will receive comments about missing classes. Set the Java project compiler compliance level to 1.4 or earlier. Java projects that are configured to compile with a compiler compliance level later than 1.4, have a known issue, where Java files referring to the RIM API have missing class errors.
  4. Click Finish.


Created September 17, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com