Java Components for Mathematics
Version 1.0

Hobart and William Smith Colleges

August 2001

(Minor changes in source code and applets, September 2005,
to fix a problem with Variable and Expression input boxes
that arose in recent versions of Java.)

(Source code released under an MIT-style license, April 2012.)

THE "Java Components For Mathematics" project represents an effort to develop a framework of configurable mathematical software components written in the Java programming language. Our Java components are meant to be used on instructional Web pages as interactive illustrations, special-purpose calculators, support for exercises, and so forth. The components in Version 1 are mostly useful for calculus and pre-calculus and for science courses that use some of the same material. They use Java 1.1.

On this page, you will find links to source code, documentation, programming information, and sample applets, including a set of configurable applets that can be extensively customized without programming, using only applet params. There are also links for downloading the applets and source code.

All software developed for this project can be used in unmodified form for any purpose, including commercial uses, without charge. The Java classes that are part of the project can be freely used in other software. Modified versions of the classes can be created and distributed subject to some restrictions, which are stated in the source code files.

I am calling this release Version 1.0, but I am sure that it still contains a number of bugs. On September 9, 2001, I made some changes to the Web site, including changes to a few comments in the Java source code. However, no changes were made to any of the actual Java classes. Bug reports and other comments can be sent to David Eck (

This project was supported by NSF grant number DUE-9950473.

Configurable Applets

One of the products of the project is a set of configurable applets that can be used with no programming. These applets are configured using applet params. (There is also a separate set of basic applets that illustrate programming techniques.) The configurable applets cover a range of mostly calculus and pre-calculus topics including: graphs of functions, families of functions, composition of functions, tangent lines, parametric curves, and Riemann sums. To use these applets on your own pages, you will need the archive file jcm1.0-config.jar. To see the applets and documentation on how to use them, follow this link:


The JCM (Java Components for Mathematics) system is defined in the Java package edu.hws.jcm, which has four sub-packages:, edu.hws.jcm.awt, edu.hws.jcm.draw, and edu.hws.jcm.functions. These packages, in turn, contain about 80 source code files. The components defined in this system can be assembled into useful applets with relatively little programming. The following documentation is available:


You can download a copy of this entire web site onto your own computer. Alternatively, you could choose to download just the JCM source code or just the "jar" files that you need if you want to use the sample applets on your own Web pages". If you have trouble downloading these by clicking on the links, try right-clicking and then selecting a "save" command from the pop-up menu.


We would be very happy to hear from people who are using these applets on their Web pages or who are writing their own applets that use the JCM system. For now, here are a few examples. (Note added April 2012: This is old code; mostof the examples that used to be here no longer exist. The first example is a project that used code based on the JCM

Examples from project participants

(These examples are mostly based on development versions and earlier versions of JCM.)

This project was supported by a proof-of-concept-level grant from the National Science Foundation. (You can read more about the grant here, including the text of the grant proposal.) This grant was awarded to Professors David Eck (, Kevin Mitchell (, and James Ryan ( of Hobart and William Smith Colleges. Two students, Gabe Weinstock (Hobart '01) and Katie Kui (William Smith '01), helped prepare the JavaDoc documentation. Gabe Weinstock also worked on some of the Java classes, including RiemannSumRects and Grid.

David Eck,, August 2001, November 2005, and April 2012