A Simple Demo Applet

The applet below is a simple example of the use of DocView. Each JTextField is linked, via DocView, to an integer property of a Java object. Updates to the property are reflected in the GUI component. Likewise, changes in the values in a GUI component is saved in the object's property but only when the GUI component loses focus.

Changes to the values in the GUI component are not stored immediately partly to avoid infinite update loops but also on efficiency grounds. In practice this compromise seems to work well.

Your browser is completely ignoring the <APPLET> tag!

If your browser does not support Java 1.1, you can execute the applet using the JDK appletviewer by passing this file as an argument to appletview. If the root of the source tree is not in your path, change directory to the directory above org and type

appletviewer org/eso/ohs/gui/docview/examples/EasyApplet.html
or run it from any directory if your CLASSPATH is suitably defined.