日期:2014-05-20 浏览次数:20899 次
public void insertString(int offset, String str, AttributeSet att)
throws BadLocationException {
if (getLength() + str.length() > maxLength) {
Toolkit.getDefaultToolkit().beep();
} else {
super.insertString(offset, str, att);
}
}