₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,140 members, 8,510,336 topics. Date: Friday, 30 October 2026 at 09:03 AM

Toggle theme

Reading From A Jtextarea In Java - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › Reading From A Jtextarea In Java (1428 Views)

1 Reply (Go Down)

Reading From A Jtextarea In Java by Capnd143(op): 8:03pm On Sep 18, 2014
@javanian
@
@ALL_java_pros
how do i read lines of text from a a JtextAREA correctly, calling the .getText() method returns a one line concatenated string of all lines in the jtextarea,
i tried doing this:
String text= JtextArea.getText().toString()
String [] splited_file = gt.split("\n"wink;
for(i=0;i<splited_file.length)
{string newFile=splited_file.toString();
AwriteFileClassObject.writeFileMethod(newfile)}
this just returns and object to the textfile and write to instead of a formated text with linefeeds!
Help me out guys
wat i want to do is just read the lines of string from a JtextArea and Write same to a file
Re: Reading From A Jtextarea In Java by PrimeSofty: 11:39pm On Sep 18, 2014
Re: Reading From A Jtextarea In Java by Javanian: 1:53am On Sep 19, 2014
Is the problem reading from the JtextArea, Writing to file or both?
Re: Reading From A Jtextarea In Java by Capnd143(op): 6:38pm On Oct 09, 2014
Javanian:
Is the problem reading from the JtextArea, Writing to file or both?
both
Re: Reading From A Jtextarea In Java by Javanian: 11:09pm On Oct 10, 2014
Post a sample text file(Your input) and sample output so i can get a picture of what you are trying you achieve.
1 Reply

Problem With Bufferedinputstream Read Blocking Issue In Java • I Want To Develop A Software In Java To Calculate CGPA • How Do Io Create Ribbon Ui In Java • 2 • 3 • 4

Get Top 10 Facebook Tips • Android(java) Need An Idea For A Free Calling Project Am Working On • C# Keylogger With Fake Virus Windows Alert [undetectable]