The following directories contain programs written in the JOOS language. In
each directory you will find a Makefile which shows how to build the
programs in the directory, i.e. which
.java files go together to form
The following directories contain Java applications (not applets).
The following directories contain Java applets. Once compiled, you
should be able to run any of the
examples of using the Abstract Windows Toolkit.
simple examples of interacting over the network.
a relatively large collection of simple Java programs.
simple multithreaded programs.
.html files in the first two
directories via the JDK
appletviewer, or via a browser that
Most examples have been taken from textbooks and modified so that they are
written in JOOS. The changes made to make them into JOOS programs include:
- Making the constructors explicit, and making them conform to JOOS specifications
with an explicit call to the
- Since JOOS does not support constants, all constants (particularly
those from the Java
must be accessed via nullary functions
found in the JOOS libarary class called
JoosConstants. You may refer
to the file
joos/lib/JoosConstants.java to see all of the
constants supported in this manner.
- Since JOOS does not support overloading, the
JOOS external declarations
only support one alternative for each method in Java libraries, usually the most general one.
In some cases, for example the
method in the
both alternatives are really needed. In this case there is a JOOS
wrapper class called
that provided a new name for
each kind of
- Some Java libarary classes have static members and/or classes. In
order to get this functionality, one needs to use the appropriate wrapper
A good example of this is the
JoosDimension class that
provides a wrapper to the Java
- Java has quite a rich class structure to support various kinds of I/O.
All JOOS I/O is simple, and is done using the functions found in the
- JOOS does not support exceptions, and so it is not possible to
directly call Java library methods that raise exceptions that must
be caught, i.e. exceptions that are not
RuntimeExceptions. Thus, some
JOOS libarary classes are provided that wrap the exception raising
methods inside a method that catches the exception and returns true if
an exception was caught, e.g.
- Since JOOS does not support real numbers, and some
require real numbers as input (
there is a JOOS version
JoosGridBagConstraints), that uses
to represent non-integers.