Saturday, 15 August 2015

java - how to read a file (.txt) in a JTextArea without using JFileChooser? -



java - how to read a file (.txt) in a JTextArea without using JFileChooser? -

i know how read file (.txt) in jtextarea without using jfilechooser? know if there other way write code on body of programme display on jtextarea`` without usingjfilechooser`?

bufferedreader in = new bufferedreader(new filereader("<filename>")); string line; while((line = in.readline()) != null) { txtarea.append(line); } in.close( );

java swing file-io

No comments:

Post a Comment