This content has been marked as final. Show 2 replies
1. This question should go into the swing forum.
2. Write your own TextArea (extends JTextArea). In this class get the document with
AbstractDocument doc = (AbstractDocument)this.getDocument();Then write your own Document filter (extends DocumentFilter) and set this filter to the document
doc.setDocumentFilter(filter)In the filter you have full control over of what is inserted in your text area.