code: @Override
  	public void insertString(int offset, String string, AttributeSet attributes)
  		throws BadLocationException
  	{
  		if (string == null)
  		{
  			return;
  		}
  		else
  		{
  			String newValue;
  			int length = getLength();
  			if (length == 0)
  			{
  				newValue = string;
  			}
  			else
  			{
  				String currentContent = getText(0, length);
  				StringBuffer currentBuffer = new StringBuffer(currentContent);
  				currentBuffer.insert(offset, string);
  				newValue = currentBuffer.toString();
  			}
  			try
  			{
  				validate(newValue);
  				super.insertString(offset, string, attributes);
  			}
  			catch (Exception exception)
  			{
  				Toolkit.getDefaultToolkit().beep();
  			}
  		}
  	}
docs: {@inheritDoc}