Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextArea insert problem  RSS feed

 
Arnold Kesselaar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys and girls,

I'm probaly missing something but I'm having difficulty doing the following:

I would like to create an empty document of a certain size. Then I would like to insert strings at various places in this document. I am however running in invalid insert errors. Is there a way to create an empty document of JTextArea of lets say 50 lines without having to do
setText(" ...")? Can someone give me some advice?
 
Gary Down
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried using constructor:-
JTextArea(int rows, int columns)
Constructs a new empty TextArea with the specified number of rows and columns.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!