Java 2DTM Programmer's Guide Imaging Sample Programs

These sample programs demonstrate new Java 2DTM Imaging features available in the Java TM 2 SDK, version 1.2 -- you will need to download the Java 2 SDKTM 1.2 or a more recent version of the SDK to run these programs.

Downloading the Sample Programs

Click the following link to download a zip file that contains all of the Imaging sample programs and necessary images.

List of Sample Programs

Java Files Description
BufferedShapeMover.java Illustrates off-screen buffering.
Blur.java Illustrates blurring using convolution.
Edge.java Illustrates edge detection using convolution.
LookUp.java Illustrates lookup-table manipulation.
Rescale.java Illustrates rescaling.
Sharpen.java Illustrates sharpening using convolution.

Compiling the Sample Programs

You can compile a sample by running javac on the sample's .java file. For example, to compile the Blur sample, type:

javac Blur.java

(This assumes javac is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

Running the Sample Programs

These sample programs are designed to run as standalone Java applications or applets. To run a sample as an application, execute the java command on the class name. For example, to run the Blur application, type:

java Blur

(This assumes java is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

You can also run the samples as applets by running appletviewer on the particular sample's html file. For example, if you would like to run the Blur applet, you would type the following line while you are in the same directory as the html file.

appletviewer Blur.html

(This assumes appletviewer is in your executible path and that you are using Java 2 SDK 1.2 FCS or greater)

[an error occurred while processing this directive]