JClass LiveTable Pro Overview
Introduction
·
Setting CLASSPATH
·
Using the Java Programming Language
Compiling a Program
·
Distributing JClass LiveTable Pro Applications
Introduction
Java is composed of many different components such as buttons, sliders, and menus. Conceptually, JClass
LiveTable Pro adds a new set of components to Java. A Java program that utilizes JClass LiveTable Pro
components is capable of displaying rows and columns of text information, images, hypertext links and
other Java components within in a scrollable window with which the user can interact.
JClass LiveTable Pro has properties that determine how the table will look and behave. Writing programs
using JClass LiveTable Pro is very similar to writing any other kind of Java program; you now have more
Java components to work with.
JClass LiveTable Pro may be used in conjunction with KL GroupÆs JClass BWT. JClass BWT provides additional
Java components that complement or replace their equivalent AWT components. JClass LiveTable Pro can also
be used with JClass Chart, which provides chart-drawing capabilities.
JClass LiveTable Pro has properties which allow control of:
- the number of rows and columns, both in the table, and visible on the screen
- cell contents: cells and labels can contain text values, JCStrings (see below) and other Java components
- row height and column width
- cell/label attributes including border, text alignment, font, and color
- user interaction including selection methods
- cell editability and traversability
- JCStrings, which enable cell/label text to use multiple fonts, images, and hypertext links
JClass LiveTable Pro also provides several procedures and methods which:
- add, delete, and move table rows and columns
- read table cell values from an external ASCII or HTML file and perform data validation of cell values
- assist the developer with setting and getting cell ranges.
JClass LiveTable Pro is implemented 100% in Java. This means that as long as the Java implementation for
a particular platform works, JClass LiveTable Pro will work. LiveTable Pro is derived from AWT components,
and supports AWT within cells. It should be noted that JClass includes customized controls, such as scrollbars,
to ensure a high quality product.
Setting CLASSPATH
Note: If you are using the MS-Windows version of JClass LiveTable Pro that is self-installing,
your CLASSPATH statement is automatically set up during the installation process.
The jctable{xxx}-classes.zip file can be located anywhere on a user's computer or on a Local Area
Network (LAN), but you must indicate to the Java interpreter where it can find the Java classes it contains.
This is done by setting the CLASSPATH environment variable. The CLASSPATH environment variable consists of
the names of directories containing compiled Java classes. The following examples will help you set CLASSPATH
properly on your system.
If you are using JClass LiveTable Pro in a development environment, do not unarchive the contents of the
jctable[xxx]-classes.zip file--its contents are automatically read by Java.
If your CLASSPATH environment variable is not set up correctly, see your system administrator or the
"Update environment variables" section specific to your computing platform. This information
can be found through the Java Developers Kit Web page at http://www.javasoft.com/products/jdk/index.html.
Before attempting to use JClass LiveTable Pro, you must be able to compile Java applications or applets.
Make sure you can compile and run simple Java applications or applets before you begin to use JClass
LiveTable Pro. Consult the Java JDK documentation for assistance in determining the location of the Java
compiler (javac) and the Java class files.
The following are descriptions for configuring CLASSPATH for specific operating systems:
Windows 95
Add a line to your AUTOEXEC.BAT file that points to the directory where jctable{xxx}-classes.zip
is installed. If jctable{xxx}-classes.zip is installed in a directory called \foo, you would
add something similar to the following to your AUTOEXEC.BAT file:
set CLASSPATH={references to other
programs};C:\foo\jctable{xxx}-classes.zip
Windows NT (3.51 and higher)
Assuming that jctable{xxx}-classes.zip is installed in a directory called \foo, add the
CLASSPATH statement to a Windows NT system by doing the following:
1. Double click Control Panel. The Control Panel window opens.
2. If you are using Windows NT 3.51, Double click System. The System dialog is displayed. If
you are using Windows NT 4.0, double click System. The System Properties dialog appears. Click
Environment.
3. Search the User Environment Variables (or User Variables in Windows NT 4.0) list for an
existing CLASSPATH statement.
If a CLASSPATH statement exists, select it. In the Value field, add the following to the existing
statement:
C:\foo\jctable{xxx}-classes.zip
If no CLASSPATH statement exists, in the Variable field, type:
CLASSPATH
and in the Value field, type:
C:\foo\jctable{xxx}-classes.zip
4. Click OK.
Note: If you are going to compile Java programs in the same directory that contains Java
.class files, add a period to the CLASSPATH statement to point the Java compiler to look for
.class files in the current directory, as in the following example:
C:\foo\jctable{xxx}-classes.zip;.
This method will work on all computing platforms.
Note to Browser Users: If you set the CLASSPATH for your entire session, the CLASSPATH will be
picked up by the Web browser as well.
Using the Java Programming Language
Java is both a compiled and an interpreted language. After writing a Java program using a text editor, save
it as a source file with the extension .java. When this source file is run through the Java
compiler, it compiles the file into a .class file. Unlike .exe or .com files,
these compiled .class files are not directly executable under any operating system, because
they do not contain machine-language code that can be understood directly by the microprocessor. Instead,
they are compiled into a byte-code format consisting of machine-language instructions designed for a
virtual microprocessor. This virtual microprocessor is the Java Virtual Machine, which interprets the
byte-code into a machine-language code that can be understood by your systemÆs microprocessor. As long
as the Java Virtual Machine software exists for a computing platform, any Java programs you create will
be able to run on that platform.
If the Java compiler and class files are installed in the standard places (typically \JDK\bin\)
can be compiled by entering the following at a prompt:
javac foo.java
Compiling a Program
Java allows for two distinct program types: stand-alone applications and applets. Stand-alone
applications can be run directly on a system containing the Java interpreter program (java),
while applets can be inserted and run from Web pages when viewed through a Java-capable browser.
JClass components can be used with both types of Java programs. Ensure you can compile and run
simple Java applications or applets before you begin to use JClass LiveTable Pro. Consult the Java
JDK documentation for assistance in determining the location of the Java compiler (javac) and the
Java .class files.
Distributing JClass LiveTable Pro Applications
You can freely distribute end-user Java applications or applets you build with JClass LiveTable Pro
components under certain restrictions.
For more information, read the License Agreement at the beginning of this manual for complete details.