+ 1
How to read a text file and display it's content to a textFieldPane/ textarea line by line??
There's a java project I'm currently busy with, it requires the user to fill in some boxes then their input is saved on a text file I called "data.txt". My code is working fine , I used scanner to read the data on the file but then it only displays the last line on the file. please help me with an example as a solution so I can understand better. Any help will be appreciated!
3 Réponses
+ 30
Are you using a loop for read each line of file?
0
yes I am, I'm using a while loop hasNext() to check if there are any other lines after the first one
0
you must post your code