Objective
This sample shows the use of the database support in Swing 1.0.2 using the JTable class
and associated classes.
Time Required
Allow half an hour to run this sample.
Before You Begin
To run this sample you need to have the following tools installed and configured for your
machine.
Description
This sample retrieves information from a DB2 database and displays it in a window created
with JTable.
Running the sample
Open the IBM Domino Examples project and expand the com.ibm.ivj.examples.domino.jtable
package. To run this example on your machine you need to make a few small
changes. In the Workbench, select the EmplTable class. The source code of this
class will appear in the source window. Change the following statements to your own
machine variables:
static String uid = "userid";
where "userid" is
the userid that you use to connect to DB2static String pwd = "PASSWORD";
where "PASSWORD"
is the password that you use to connect to DB2Select your Parameters
Because this sample runs as both an application and an applet you can add the
properties for both.
From the Properties for JTableExample notebook:
Valid names for the parameters are any names in the DB2 SAMPLES database.
Run as an Applet
Run as an Application