First of all, I am very basic at java. I am trying to browse a .txt file and load the contents of it, into the text area. I am completed the part, till which I receive the f
For indentation and line break you have to use "\n" before appending to to the text area..
BufferedReader buff = null;
try {
buff = new BufferedReader(new FileReader(selFile));
String str;
while ((str = buff.readLine()) != null) {
jtextArea.append("\n"+str);
}
} catch (IOException e) {
} finally {
try { in.close(); } catch (Exception ex) { }
}