textField.finalizeConstruction();
if (type.equals("int"))
textField.addValidator(new IntegerValidator());
else if (type.equals("long"))
textField.addValidator(new LongValidator());
else if (type.equals("float"))
textField.addValidator(new FloatValidator());
else if (type.equals("double"))
textField.addValidator(new DoubleValidator());
else