checkValidInput();
    public void replace(DocumentFilter.FilterBypass bypass, int offset,                         int length, String text, AttributeSet attributes)      throws BadLocationException    {      super.replace(bypass, offset, length, text, attributes);      commitIfAllowed();    }