This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by Anand Loni: I want to limit 80 characters on each line in JTextArea. I have set my own document on JTextArea and I am overriding insertString method to check length. But I am unable to do this.
This approach should be workable. (You probably also want to override the replace() method.)
Why don't you show us the insertString() code so we can analyze what went wrong?