How do I append text to a text area in a Java program?

<>

This question already has an answer here:

Answers


Use append method

text_ref.append(nationality + "is the nationality...");

Use append method passing the String literal, which need to be appended

  text_ref.setText(nationality + "is the nationality...");
  text_ref.append("I am just appending here to the current text");

To append text in JTextArea child object you have to use the append method of this object.

text_ref.append("some text to append");

or

nationality = "Polish";
text_ref.append(nationality);

Need Your Help

quick/fast integer multiplication in ruby?

ruby multiplication mandelbrot

I am trying to make a quick/efficient Mandelbrot implementation in Ruby. A long long time ago, one way to speed it up was using fixed point integers instead of floats.

Remove Duplicates not working on Date values

excel-vba excel-2007 vba excel

I am using VBA code to remove duplicates on a sheet where I have copied data from two sources. Prior to copying the data, I am using other VBA code to format the data so that the formats are identi...