I have an `JFormattedTextField` created by

```
JFormattedTextField(NumberFormat.getInstance);  

```

I would like to augment its behaviour, so that if the user 
enters a zero and the field loses focus, it reacts exactly as if the user had entered e.g. "foo". 

Using an `InputVerifier` somehow wrecked the reverting behaviour, and using a custom subclass of `DecimalFormat` did not revert when zero was entered, but instead cleared the field.  

(By zero I mean, anything that parses to `BigDecimal.ZERO`.)

The code I used:

```
new DecimalFormat(){
{
    setParseBigDecimal(true);
}
public Number parse(String txt, ParsePosition pos){
     BigDecimal num = (BigDecimal) super.parse(txt, pos);
     if(num == null || num.compareTo(BigDecimal.ZERO) == 0)
          return null;
     else return num;
}

```

Zero was not accepted then, but the field only reverted on letters entered.