public void insertString(int offs, String str, AttributeSet a)
			throws BadLocationException
	{
		if (str != null && maxLength != 0)
		{
			int currentLength = getLength();

			if (maxLength <= str.length() + currentLength)
			{
				str = str.substring(0, maxLength - currentLength);
			}
		}
		super.insertString(offs, str, a);
	}