JTF > Demo Gallery > Simple Programs

Simple Programs using the ACM Libraries

This page provides links to programs that illustrate how to create simple programs of the three standard Program subclasses: GraphicsProgram, ConsoleProgram, and DialogProgram. The more advanced features of these classes and the supporting packages are described in subsequent sections of the demo gallery. In the table below, clicking on the thumbnail runs the program as an applet. Clicking on the filename downloads the code.
 
Hello.zip
This download includes three versions of a simple “hello, world” program that illustrate the standard Program subclasses.
Add2.zip
This download includes two versions—one written as a ConsoleProgram and one written as a DialogProgram—of a program to add two numbers entered by the user.