The remainder of this page describes how to install and use the package on your own platform. The Java 2 platform is required.
There are two main uses of this package.
java -jar viewer.jarPlease note the case of the letters in the above command. On Windows, the application can also be run by double-clicking the icon for viewer.jar.
To create and manipulate a tree, enter any string in the text field in the upper left-hand corner, and press either the Put button to add that string as a key to the tree, or the Remove button to remove that key from the tree. The keys will be maintained in lexicographic order. The Back and Forward buttons allow you to move through the history of your tree construction. The Clone button opens a new window with an exact copy of the tree and history in your current window; the tree in this window can then be manipulated independently.
Important Note: This applet treats all keys as strings. You may enter numbers, but be aware that they will be treated as strings (e.g., "10" < "5"). Virtually all of the questions I've received regarding this program have reflected a misunderstanding of this fact.
javac -classpath viewer.jar *.java java -cp .;viewer.jar MyClass.java(On unix, the ";" is replaced by a ":".)
See also: A demo that uses this package for drawing AVL trees of a given height using a minimum number of nodes.
Rod Howell (firstname.lastname@example.org)