Java Web Generator and Editor

Java program uses java's GUI functions with awt, swing, io. Also uses file reads and writes. This program runs on windows, uses DOS batchfiles and makes specific command line calls. With some modification it could be made to work on other platforms. The program creates and edits webpages.

Java Code - Instructions - Help Files

There are five Java files:

Called by the takes the JText input from the main program and generates HTML content and returns it to the main where is it made into a file

Called by Opens an interface for entering text and settings that will go into an HTML file. The file content is generated by

Main class for the program. Opens a small window with button options for the sub-programs/classes

Very simple class for editing files that have already been created

For, but may be called by any program. Closes java GUI windows.

  1. Place all the files in the java bin directory, except output.doc and README which are not needed to run the program
  2. Compile java and run
  3. This program runs on windows, uses DOS batchfiles and makes specific command line calls. With some modification it could be made to work on other platforms.
  4. This program will create a directory in C:\windows\desktop called MyWeb with one file and a subdirectory called "images" All files created by the program will be saved here. References to images within the generated HTML are to the "images" folder in this directory. This is the batch file that creates the directories and file:

    Contents of mkWeb.bat:
    |REM If you are using NT, 2000 or XP this will have to be
    |REM modified to change the path for c:\windows\desktop
    |@ECHO OFF
    |if exist c:\windows\desktop\myWeb\myweb.txt GOTO QUIT
    |MKDIR c:\windows\desktop\myWeb
    |MKDIR c:\windows\desktop\myWeb\images
    |GOTO EX
    |GOTO EX
    For more information on batch files, click here.
  5. The text file myweb.txt keeps the directory from being overwritten, if deleted the diretory can be overwritten. This is also stated in the help file.
  6. Specific instructions for using the program are in the help file: helpfiles.html. You may open this file manually or by clicking the "Help" button in the running program

Help files

New Web

To being creating your HTML pages, start the main Java program: MainInterface in the java bin.

New Web

The first screen should look like this:

If you are using this for the first time, press the New Web button. This will create a space for your HTML files, all will be saved there by default. Once you have done this you will not have to use the New Web function. Pressing the New Web button again by accident should not write over your files unless you have altered the directory files that were generated automatically.

The web files will be located in: C:\windows\desktop\myweb\
Place any image file you want to access in: C:\windows\desktop\myweb\images\


Press the Generator button in the main interface window to get started. this opens the HTML Page Maker interface.

Here there are several fields to be filled out and some button options.

File Name: Enter your File Name(you don't need to type .html at the end).
Title: Title will appear in the window title and at the top of the page.
Meta Data: Invisible search terms that help engines find your page. Enter words seperated by commas.
Background Color: Pick a nice Background Color.
Text Color: Pick a text color that will be seen on the Background Color.
Text Font: The font for the page text.
General Link: In General Link, enter the full URL of a page you want to link to.
General Link Name: Then enter the name of the above link in this field.
Image: To add an image to your page, use the file extension. Place the actual file in C:\windows\desktop\myweb\images\

The area bellow is for your content. Press the Add Paragraph button when you are done with a paragraph.

The Buttons

Publish Will write your input to the designated file and then clear all the fields for new entry.

Add Paragraph Add your paragraphs, clears the window for new entry.

Launch Opens your file in a browser, but does not clear the entry. You may change the parameters, click "Launch" again and then "Reload" or "Refresh" in your browser to see the changes.

Help Opens this help file.


A simple editor to edit files you have already created. Once you are more familiar with the HTML coding, use this to alter your files.

Open and Edit Existing File: You only have to enter the name of the file, not the directory or file extension, it is set to open the files in C:\windows\desktop\myweb\

Save: Save the changes.