I'm working to build a editor; so I'd like to know whether the test in JEditPane is modified or not? The following code seems not work :(
JEditorPane editorConfig = new JEditorPane();
editorConfig.getDocument().addDocumentListener(new DocumentListener(){
@Override
public void insertUpdate(DocumentEvent e) {
System.out.println("a");
Dialogc.this.refreshTitle();
}
@Override
public void removeUpdate(DocumentEvent e) {
System.out.println("b");
Dialogc.this.refreshTitle();
}
@Override
public void changedUpdate(DocumentEvent e) {
System.out.println("c");
Dialogc.this.refreshTitle();
}
});
Thanks Klaus Ma
Aucun commentaire:
Enregistrer un commentaire