How to put limitations on size & no. of characters in JTextArea?

Posted by Supereme on Stack Overflow See other posts from Stack Overflow or by Supereme
Published on 2010-02-19T13:11:44Z Indexed on 2010/04/22 15:03 UTC
Read the original article Hit count: 198

Filed under:

Hi,
I'm developing an application that requires a textarea to be used in which no. of characters are restricted to 165. I made an object of JTextArea with row & column no. 3,3 respectively but it didn't work as when I went on typing, the size of 'Textarea' went on increasing.How to restrict that? As I've used 'DocumentListener' for noting no. of characters typed,deleted,cut and pasted, I'm getting problem when suddenly the size of textarea is increased. Thank you!

© Stack Overflow or respective owner

Related posts about jtextarea