₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,324,995 members, 8,419,857 topics. Date: Thursday, 04 June 2026 at 03:20 AM

Toggle theme

Reading From A Jtextarea In Java - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingReading From A Jtextarea In Java (1403 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 JavaI Want To Develop A Software In Java To Calculate CGPAHow Do Io Create Ribbon Ui In Java234

Video Tutorials On SQL, For FreeWho Can Design An Automatic Voice Dialing ProgramHow Do I Create MYSQL Root Password?