How to set JtextArea to keep fixed no of rows?

Posted by Hippo on Stack Overflow See other posts from Stack Overflow or by Hippo
Published on 2010-04-11T06:46:42Z Indexed on 2010/04/11 6:53 UTC
Read the original article Hit count: 327

Filed under:
|

How can i keep no of rows constant in text area. I need to create a console window for my application. If rows exceeds predefined no of rows first rows must get disposed. As if first written row will be destroyed first when i append anything which exceeds no of rows set. One more thing , i need to keep vertical scroll bar. That means no of rows must not be the whatever rows are visible when text area it opened.

For example : - no of visible rows on view port are 30. It should keep 120 rows information, which will can be seen with the help of scroll bar.

© Stack Overflow or respective owner

Related posts about java

Related posts about jtextarea