/**
  * textÎĵµ¼àÌý
  */
class MyDocumentListener implements DocumentListener{
  public void changedUpdate(DocumentEvent e){
  }
  
  public void insertUpdate(DocumentEvent e){
  } 
  public void removeUpdate(DocumentEvent e){
  } 
}

解决方案 »

  1.   

    public interface DocumentListener extends EventListener {    /**
         * Gives notification that there was an insert into the document.  The 
         * range given by the DocumentEvent bounds the freshly inserted region.
         *
         * @param e the document event
         */
        public void insertUpdate(DocumentEvent e);    /**
         * Gives notification that a portion of the document has been 
         * removed.  The range is given in terms of what the view last
         * saw (that is, before updating sticky positions).
         *
         * @param e the document event
         */
        public void removeUpdate(DocumentEvent e);    /**
         * Gives notification that an attribute or set of attributes changed.
         *
         * @param e the document event
         */
        public void changedUpdate(DocumentEvent e);
    }