Okay, I want to override JTextArea’s Document’s remove method, I can’t figure out what class to extend. I can’t extend Document cause it’s a interface, and that also means it must not be the document that JTextArea creates. So how exactly can I easily override my JTextArea’s document’s remove method?
Okay, I want to override JTextArea’s Document’s remove method, I can’t figure out what
Share
The default
Documentof aJTextAreaisPlainDocument, as mentioned increateDefaultModel(). Here is a simple example of overridinginsertString()inPlainDocument.