JtextArea: add each line into muilt arrray

Is there simple way to load each line of text from JtextArea into Multi Dimensions Array? Example first line of the JTextArea goes into Array[0] and the second going into array[1], etc.

Or do I need do roundabout way dealing with placing everything in string and pick apart each line using return value as a way to put each line into array[#]?

Or use different textbox that can handle large amount of text, which it can add each line into array[#] without a round about away?

[494 byte] By [TheMadCata] at [2007-11-27 9:56:10]
# 1

> Is there simple way to load each line of text from

> JtextArea into Multi Dimensions Array? Example first

> line of the JTextArea goes into Array[0] and the

> second going into array[1], etc.

>

> Or do I need do roundabout way dealing with placing

> everything in string and pick apart each line using

> return value as a way to put each line into

> array[#]?

The roundabout one. Use System.getProperty("line.separator"); as the return value.

> Or use different textbox that can handle large amount

> of text, which it can add each line into array[#]

> without a round about away?

hunter9000a at 2007-7-13 0:26:17 > top of Java-index,Java Essentials,New To Java...
# 2

Thank you, hunter9000. How would you use the System.getProperty("line.separator")? Would you load JTextArea into string and have go into loop that get the String (start int, end int) which copy everything from the start value to where it see the "Enter value" that part into Array[1]. Delete/skip the part thats already copy and move down the string and does the something?

Sorry for newbie questions..

TheMadCata at 2007-7-13 0:26:17 > top of Java-index,Java Essentials,New To Java...