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 using
jfilechooser`?
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