Java - Single Field Validation

Java includes the AWT class ("Abstract Windows Toolkit") which provides several components that are useful for single field validation. Some of these components are:

Using these GUI components and a little Java code it is possible to validate many different types of User input for individual fields. In fact, the Choice, List, and Checkbox components provide validation by simply limiting the Users options to the values that you provide when creating the component in Java.

ADVANTAGES:

DISADVANTAGES:

The examples provided below demonstrate some of these components:

Example of Individual Components in Separate Applets

Example of Several Components in a Single Applet

Previous Module Return to Project Main Page Next Module