Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,148,906 members, 7,802,938 topics. Date: Saturday, 20 April 2024 at 04:26 AM |
Nairaland Forum / Science/Technology / Programming / Reading From A Jtextarea In Java (1225 Views)
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)
Reading From A Jtextarea In Java by Capnd143(m): 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" 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 |
Links to possible answers below: http://stackoverflow.com/questions/3550656/read-jtextpane-line-by-line http://www.coderanch.com/t/345884/GUI/java/Jtextarea-read-line-line 1 Like |
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(m): 6:38pm On Oct 09, 2014 |
Javanian: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)
Programming Difficulties... Needs Your Take... / Need Help With Matlab Programming / Check Out This Brief Fact About Mobile App
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6 |