NSF Acknowledgment and Disclaimer

This material is based upon work supported by the National Science Foundation under Grant No. DUE-9950829.

Any opinions, findings and conclusions or recomendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation (NSF).

Updated on March 1, 2005


The Java Power Tools enable the rapid development of Java graphical user interfaces with automatic error checking of all user input. By systematic abstraction (extreme encapsulation) that brings the central issues of GUI building to the forefront and hides all details that are purely technical, the Java Power Tools permit small GUIs to be built in minutes and large GUIs in an hour or so. These tools are particulary useful for faculty and students who wish to use GUIs but do not wish to spend a great deal of time on their creation. In recent enhancements to the tools, users may also paint shapes, images, and text with ease.

The Java Power Tools include the Java Power Framework that enables both instant experimentation and systematic testing. The JPF is so easy to use that freshman students may build simple experiments in the first weeks of a course. The JPF is also powerful enough that it scales to testing of large systems with both textual and graphical output and complex user interaction.

The Java Power Tools are 100% open source and may be used as a model of object-oriented design in upper level OO design courses.

Java Power Tools Resources: Library, Source, API

The Java Power Tools Library jpt.jar

Download the JPT Library: jpt.jar

Download the jpt.jar installation notes jpt_jar_readme.doc in Microsoft Word format.

Download the jpt.jar installation notes jpt_jar_readme.pdf in Adobe PDF format.

Download jpt.jar and the installation notes in zip format

Download jpt.jar and the installation notes in self-extracting exe format

The Java Power Tools Source Files

Access the Annotated Java Power Tools Source Files online (strongly recommended)

Access the Alphabetical Java Power Tools Source Files online

Download all Java Power Tools Source Files in zip format

Download all Java Power Tools Source Files in self-extracting exe format

The Java Power Tools API Documentation

Access the Java Power Tools API documentation online

Download the Java Power Tools API documentation in zip format

Download the Java Power Tools API documentation in self-extracting exe format

The SUN Java API Documentation

Access the SUN Java API Documentation online

The Java Power Framework

The Java Power Framework or JPF is designed to permit instant “experiments” using small methods, quick unit tests of individual classes, systematic integration tests of families of classes, and full tests of entire applications. A detailed discussion of how to use the JPF is presented with the annotated description of the JPF Source Files. In brief, the key idea is that the user can enter certain public methods into a class that extends JPF and these methods will automatically generate buttons in the JPF Button Panel that call the corresponding methods when clicked. In this way, it is possible to create tests and execute them almost instantly.

The Java Power Framework may be integrated with the support class LookAndFeelTools to enable setting the look and feel immediately prior to opening the JPF Button Panel. This permits an instructor to automatically adjust the sizes of the fonts used by Java so that they become large for classroom presentation.

The following class shows a typical “starter class” for use with the JPF.

The JPF “starter class” Methods.java.

The file Methods.java may also be obtained bundled with a Metrowerks 8 project file:

The bundled Methods.java in a zip file.

The bundled Methods.java in an exe file.

As you can see from examination of the “starter class” Methods.java, the class is endowed with a rich set of Java import statements. The reason for this decision is that it is very frustrating when doing experiments to have to stop to find a needed import. The imports provided include all imports that we have needed in teaching Java for five years.

The structure of the central portion of the starter code in Methods.java is as follows:

    public class Methods extends JPF 
        public static void main(String[] args) {
            // To optionally adjust the look and feel,
            // remove the comments from one of the two statements below.
            // LookAndFeelTools.showSelectLookAndFeelDialog();
            // LookAndFeelTools.adjustAllDefaultFontSizes(2);
            new Methods();

The critical issues are that Methods extends JPF and that new Methods() is called which automatically calls the default constructor for JPF which in turns sets up the test GUI using the appropriate public methods in the Methods class.

In practice, a user would add appropriate public methods to the Methods class and these would give rise to corresponding buttons in the automatically generated JPF Buttons Panel. See the notes in the JPF Source Files documentation for further details.

For examples of the use of the Java Power Framework see the sections below on:

JPT and Eclipse

Access detailed instructions for using JPT in Eclipse here. Numerous screen snapshots are provided in the document and as a slide show.

The Kaleidoscope Case Study

The Kaleidoscope Case Study was the motivating example for the introduction of the interfaces Paintable and MutatablePaintable, and the classes ShapePaintable, ImagePaintable, and TextPaintable that enable to encapsulation of shapes, images, and text in ways that permit both direct painting and the creation of components, buttons, icons, bitmaps, and texture paints. This case study also illustrates the use of the Java Power Framework to easily create a testing environment that scales from simple classes and methods to full scale graphics and GUIs.

The Fractals Demo

The Fractals Demo provides access to two programs that demonstrate fractals. These programs are bundled together using an instance of the Java Power Framework.

The Concentration Game

The Concentration Game provides a simple memory game that asks the user to match tiles with hidden images. The user can view two tiles at a time and these tiles will remain visible on the next move only if they match. The goal is to match all tiles with the fewest moves.

This game illustrates a core program that may then be launched as an application or an applet using a few small auxiliary classes.

The 32 and 64 Bit Display Viewers

The Bit Display Viewers provide an experiment tool that allows students to explore the bit representation of 32-bit entities (int and float) and 64-bit entities (long and double).

The Web Image Viewer

The WebImageViewer enables a user to scan some or all of the images in a web directory provided that there is a text file available that lists the desired image file names one per line. The viewer therefore requests the URL of the images, the name of the image list text file, and the URL of the text file if it not the same as the images URL. If the name of the image list is not provided, it is taken to be imagelist.txt.

The Web Image Viewer is very useful for students and faculty who are building web sites and need to check that all necessary image files are in place. The viewer also illustrates the powerful tools provided by JPT for loading and processing image files. These tools may of course be called by student or faculty Java programs.

Tree Experiments

The Tree Experiments site investigates the structure of random binary search tree by providing graphs of random trees and by gathering experimental statistics on the heights of such trees by doing up to 1000 experiments at a time.

The JPT Book

The JPT Book will eventually provide a systematic online tutorial to the Java Power Tools and the Java Power Framework. At the moment, this book contains the extensive first chapter. The sample programs from this chapter are bundled together using an instance of the Java Power Framework.

Assorted Demos

The Demos site provides access to numerous JPT demos. The demos vary in age with some from the earliest days of JPT and some more recent. The demos of animated algorithms, automata, 3D boxes, dot patterns, function plot, Hilbert curve, recursive fractals, SIGCSE maze, and swimming fish retain some interest even today. Certain other demos illustrate simple uses of JPT and may be of help to beginners. A few demos are there for historical reasons and have not been removed since the site was created from our internal code as is.

The JPT Java Submissions to the ACM Task Force

The ACM Education Board Java Task Force was formed for the following purpose:

To review the Java language, APIs, and tools from the perspective of introductory computing education and to develop a stable collection of pedagogical resources that will make it easier to teach Java to first-year computing students without having those students overwhelmed by its complexity.

The JPT Java Submissions to the ACM Task Force act as mini-tutorials for the JPT and may be of some interest to the teaching community.

Contact Information

The Java Power Tools team:

Name E-mail Telephone
Richard Rasala rasala@ccs.neu.edu 617-373-2206
Viera Proulx vkp@ccs.neu.edu 617-373-2225

To send e-mail to the Java Power Tools team, use: jpt@ccs.neu.edu

Our postal address and fax number are given below:

College of Computer & Information Science
Northeastern University
Boston, MA 02115 USA
Fax: 617-373-5121