Lines of text on JEditorPane
I need to open an ASCII text file, read the lines (one by one) and add then to a JEditorPane. I cannot use the reader like this:
FileReader reader =new FileReader(dataFile);
dataDisplay.read(reader,null);
because I have to do some manipulation with the lines first. Anyway, the point is that I have no idea how to add the lines one by one. I tried this:
while (line !=null ){
line = in.readLine();
dataDisplay.setText(line);//dataDisplay is my JEditorPane
}
but I end up with just the last line of the file in display. Any suggestions?
Thanks!

