I'm not sure how you create your JTextArea, but after some googling this is what I found.
...
Type: Posts; User: Json
I'm not sure how you create your JTextArea, but after some googling this is what I found.
...
Have a look at the addInputMethodListener method to see if you can add an input listener and every time an event comes in you will have to check the text in the textarea and cut it if its too long.
...