Animated Validation - Swing Java


These two applets are the Java Swing versions of the equivalent Java AWT applets. They will not work on the Internet unless the user's browser incorporates the necessary Java plug-in software

</COMMENT> </COMMENT>

The capability of inputting data with total confidence that no incorrect parameters can be input (perhaps unwittingly by a user) is very important for running secure applications within secure Java systems.

This is illustrated by the quotation below:

"Many companies have looked to anti-virus, firewalls, encryption tools, authentication tokens, virtual private networks (VPNs) and network intrusion detection systems to help protect their enterprise. Now with the rise in business-to-consumer (B2C) and business-to-business (B2B) transactions, however, companies are looking to managed service providers and still other security tools. The network perimeter can no longer be like an impenetrable wall, rather it has to be porous, letting in many outsiders crucial to doing one's business. How does the enterprise ensure security is maintained in the new e-economy environment? The answer lies in a shift, currently underway in the market, from basic network infrastructure security to towards application level security."
Today's E-Commerce - Not the Shopping Spree of Yesteryear - IJCS p38 - Mar 2001.

On-line data input is not easy in Java, particularly in giving feedback to a user - and requires an unexpected amount of effort to implement. This "Applet implements Runnable" and introduces a "thread" invoked by run ( ) to indicate any erroneous input. The code developed here was based on a technique used within a military command and control system, in which it was extremely important to indicate the precise data field that a user had input incorrectly. Such discipline is extremely important to ensure that internal computer processes always work with data within precisely defined limits. Also any resulting system "crash" resulting from the introduction of incorrect data is highly likely to introduce security risks. Input and validation classes and methods like this are necessary for secure applications within secure Java systems.

The left applet demonstrates the input and "animated" validation of precisely defined parameters. The right applet demonstrates the amendment of existing data. Ony four characters are different in the respective source codes.

The values input are output onto a panel to confirm that only valid input parameters are accepted.

A UML class diagram of the applet is depicted below. This input/amendment validation Java applet has been created using Sun Java 2 (i.e. SDK 1.3.0) and the HTML coverted with the Java Plug-in HTML Converter. The two versions are operable on:


Animated Validate Test Configurations

Program Version Java Swing Applet Displayed by Browser
Sun Appletviewer MS Explorer 5.0 + Java Plug-in 1.3.0_1 or laterNS Communicator 4.73 + Java Plug-in 1.3.0_1 or later
InputValidateS2 - Java 2 JDK 1.3.0. Yes YesYesYes
AmendValidateS2" - Java 2 JDK 1.3.0. Yes YesYesYes

[UML Diagram] [UML_RMI_Validation Diagram] The left hand diagram shows the client-only version.

The right hand diagram shows a development of this basic applet, implemented so that methods are communicated between the server and the client by Remote Method Invocation (RMI). Here, the server Java runs within a Jakarta-Tomcat server within a Red Hat 7.2 Linux environment; the client software is downloaded from the server and run within Windows 98. The java files were compiled using J2SDK1.4.0.

As with the client version, there is very tight control of application parameters. Any input of incorrect data causes coloured markers to flash on the screen - using animation activated by a Thread - until the correct data is input. Only when all of the data is correct can it be submitted to the server application program. The data can be input to an JApplet or to a JFrame.

Implemented by
John R. Oliver
Tel: +44 1494-488-409
E-Mail: john.r.oliver@btinternet.com

Java Class files updated
wef 7 February 2002.


[Return to Home Page] [Button JDA]