Text Editor: README


Netscape Tips

The real power of this applet/application is revealed when run via the appletviewer utility or as a stand-alone Java application. However, there are a couple of things you can try in Netscape. For example, try this URL with the "Read from URL" option, then with the "Show URL" option:

http://www.patriot.net/users/anil/java/InfoBook/

Description

This "Text Editor" applet/application demonstrates how to write a simple Text Editor application in Java with built-in functionality for working with URLs and local files. It was developed mainly for trying out most of the features of Java's AWT (Abstract Window Toolkit).

It is not very useful when run within Netscape mainly because of security restrictions for working with local files or hosts other than the one the applet is downloaded from. Nonetheless, it can be used as a Text Editor or a debugging too for CGI developers when run as an application (using the java virtual machine) or as an applet using the "appletviewer" utility.

Here is a brief description of the various button/menu options provided in this applet/application:

    New           - Clears the Text area for editing a new file
    Open...       - Provides a File Dialog for opening a local file
    Save          - Saves the current file
    Save As...    - Provides a File Dialog for saving a file locally
    Read from URL - Reads the contents of a resource into the text area
                    (e.g. http://www.somehost.com/login.sh?User=me&Pass=in)
    Write to URL  - Writes the contents of the text area to a resource.  This
                    can useful in simulating the CGI "POST" method.  For
                    example, the above URL can be specified in the URL textedit
                    box and the parameters in the text area as follows:
                    User=me
                    Pass=in
    Show URL      - Requests the browser to process a URL
    Exit          - Exits the application

Enjoy,
Anil Hemrajani
anil@patriot.net