DataValidator(JComponent component,Document... docs){
  this.component=component;
  documents=docs;
  for (  Document doc : docs) {
    doc.addDocumentListener(this);
  }
  revalidate();
}

DataValidator ( JComponent component , Document ... docs ) { this . component = component ; documents = docs ; for ( Document doc : docs ) { doc . addDocumentListener ( this ) ; } revalidate ( ) ; }
create a new datavalidator .
