Tell me how you can display many lines in jTextArea2

for (int i = 0; i < 10; i++) { jTextArea2.setText(new String( new char[] {a[i]})); } 
  • in the loop, the string s + = new String (new char ...); to collect, and then it is in the textArea or in some other question? .. - ivkremer
  • Maybe you sat down and read about the work of strict in Java ?? - Gorets
  • and how else can it be like that? to add directly to jTextArea2, since in the future the code will have to be added to the output in the same window - DJK
  • After I saw the answer, I got the meaning of the question) Sori) - ivkremer

1 answer 1

 for (int i = 0; i < 10; i++) { String text = .... jTextArea2.append(text); } 
  • Yes it works. Thank! - DJK