This sample database contains a collection of live code examples that illustrate techniques for developing client applications written in Java.
These examples reside in the Examples37_Java database.
This page covers the following topics:
When you develop Java clients in the SilverStream Designer, you create interactive forms that provide a powerful graphical front end to a database application. Besides providing an interactive user interface, forms are also programmable controls that have their own set of properties, methods, and events.
You can implement a form as a standalone container for other controls, as a subform on a container form, and as a dialog box that opens in a separate window.
Typically, you design a Java interface for clients when you want intranet users to run your application as a dedicated program. Types of Java clients include:
In the Java Examples database, you will find examples that demonstrate numerous techniques for developing Java clients, including:
Implementing data source objects to access a tab-delimited file, access a relational database, execute a SQL query against a data source, and return data using the java.SQL.ResultSet
Creating different types of dialogs that appear in response to a button click
Sharing global methods, constants, and variables between forms
Transferring data between the Java client application and a database
Implementing a listener to determine which control on a form has focus
Implementing an image picker form that lets users select an image, then insert the image into an HTML Edit control. The example provides three ways to insert the image: from a repository in the SilverStream database, by browsing the file system, and by entering a URL
Using Java coding techniques to load and navigate arrays, cast objects to different data types, change the color of form controls, convert from one data type to another, set fonts programmatically, create and manipulate hashtables, and use Java reflection to obtain information about selected classes
Programming Java Swing controls, including JProgressMeter, JSlider, JTable, and JTree
Manipulating, formatting, and updating data within Java-based views
Developing a menu-based text editor form that implements functions you would find on a Notepad application, such as clipboard operations
Using SilverStream programming techniques to implement operations such as handling data concurrency errors, creating controls that dynamically bind to a dataset, validating data on a form, implementing context-sensitive help, using JavaBeans on a form, writing security access expressions for objects, using a servlet to manage a database, using the Session Object to share information between forms, and writing methods in utility classes that can be called from other classes
Using SilverStream Application Server Version 2 form controls, including getting values from a dropdown list, activating an image button in hover mode, obtaining the control state of a radio button, simulating a clicked event, and starting and stopping the timer control
After installing the Java Examples database, start the Main Designer.
Expand the Java Examples database in the left pane of the Main Designer and click to select Forms.
In the right pane of the Main Designer, select frmMenu, the form that launches the application.
The home page opens in SilverJRunner, providing links to interactive examples, usage instructions, and information about techniques:
Browse through the list in the left navigation pane and select examples of interest.
A description of the example you select appears in the right pane.
Click the Show Example button to bring up the live example:
Note that this display includes a View Documentation button, which when pressed brings up a detailed description of the technique illustrated in the example.
To learn how to implement Java techniques and access sample code that you can incorporate in your applications, go to Application Techniques in the help system: Java Client Techniques, Data Access Techniques, Core Programming Techniques, Triggered Business Object Techniques, and Administration Techniques.
For more information about developing Java clients, see Form Designer in the Tools Guide and the following chapters in the Programmer's Guide:
Copyright © 2001, SilverStream Software, Inc. All rights reserved.