FileDocCategorySizeDatePackage
FixedLengthPlainDocument.javaAPI DocExample837Mon Nov 09 12:45:52 GMT 1998None

FixedLengthPlainDocument

public class FixedLengthPlainDocument extends PlainDocument

Fields Summary
private int
maxLength
Constructors Summary
public FixedLengthPlainDocument(int maxLength)

    this.maxLength = maxLength;
  
Methods Summary
public voidinsertString(int offset, java.lang.String str, javax.swing.text.AttributeSet a)

    if (getLength() + str.length() > maxLength) {
      Toolkit.getDefaultToolkit().beep();
    }
    else {
      super.insertString(offset, str, a);
    }