Original Post
I'm having something of a problem with a bit of Java interface code. Here's the situation: I have a JTextArea on a frame. I want the user to input some text of variable length into the JTextArea for later retrieval by my application. HOWEVER, I want there to be a maximum number of rows of data (and, a maximum column count too, but that's handled by the word wrap.) Here's the problem: I can't set the maximum number of rows. setRows(int) does not work. Whenever I type past the end of the JTextArea, the text cursor just goes off the component and into never-never land. I'm still typing - I can do things like shift-home ctrl-c and copy the text I wrote, even if I can't see it. I just want it to not allow any further input after a specified number of rows. I can't get it to do that. Any help would be much appreciated, thanks all.