Newline "\n" in TextField java -


I am creating strings (3 different objects) and at the end of the string when I print in the console, A new line is given what is expected, but when I use settext in the textfield, I see a line, is there a way to get a new line in the text area?

  while (itr.hasNext ()) tx + = "N" + el.getnombre () + "" + + + "\ n"; Println (TX); Textfield.setText (TX); JTextField or TextField (Not sure what you're using) are only for single rows.    

. If you want a multilingual text display and you are using swing, then use a JTextArea if you are not using swing, please tell us which GUI library you are using, this one Important details, which should mention your question.

Comments