Paint and Guest Book Program
A paint program is available for use. This program can be used in a number of different
situations some of which are:
The program consists of a Java applet and two supporting PHP scripts.
- As a guest book where entries are personalized. Each entry consists of a picture
generated by a visitor using a paint program. Thus allowing the visitor to be more creative
than with 'text only' guest books.
- As a competition where visitors are encouraged to submit pictures for review and where
winners are selected and published at regular intervals.
- As a graffiti board.
- As an example of a complete Java source program which uses many features of the
java.swing, java.awt and java.net packages.
A help file is included with the program. This file describes in detail the capabilities of the program and how to use it.
The java applet is called from an html file (see Paint.html) using the following code:
<applet code="Paint.class" archive="Paint.jar" width=1050 height=80>
<param name=Server value="bprentice.webenet.net">
<param name=Directory value="Paint">
<param name=ReadFile value="picture">
<param name=WriteFile value="picture">
The four 'param' lines define the applet options. The value of 'Server' is the address
of your server. If you install the program in a subdirectory of your public_html directory, set the value of 'Directory' to that subdirectory otherwise set the value of 'Directory' to "".
The program saves picture entries in a picture file. This file contains a special
header. For security reasons,
the program will not create this file and will only append pictures to an existing
file containing this special header. The file is normally called picture and is
created by making a copy of the file called header.
The values of 'ReadFile' and 'WriteFile' should normally be set to the same value picture.
If you wish to edit a picture file, however, set the value of 'ReadFile' to an existing
file and set the value of 'WriteFile' to the name of a new copy of the header file.
To install the program do the following:
Download Paint.zip and unzip it using
WinZip. This will provide you
with copies of all the files.
- Decide whether to use the program as a guest book, as an art competition
or for some other purpose.
- Decide on a directory to hold your program. This will typically be your
public_html directory or one of its subdirectories.
- Edit the Paint.html file to reflect your needs paying particular attention to the
four 'param' lines which define your options.
- Upload the 'jar' file, the two 'php' files, all the 'gif' files, Paint.html, PaintHelp.html and
header to your selected directory.
- Make a copy of header and call it picture (or the value of the WriteFile parameter if
you changed this parameter).
- Test your program.
The following files are included in Paint.zip.
You may examine and try a
The Java source code for Patterns together with the source code for the supporting PHP scripts is included in Paint.zip
The format of the picture file is described
Please take a look at my
This program was written by Brian Prentice who may be contacted at
355, So 8th St., #1
Coos Bay OR 97420