How do I initialize a JTextArea from an input file?
Location: http://www.jguru.com/faq/view.jsp?EID=550961 Created: Nov 18, 2001 Modified: 2002-07-29 21:16:52.027 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Question originally posed by John Zukowski PREMIUM (http://www.jguru.com/guru/viewbio.jsp?EID=7 The JTextComponent provides a read() method to initialize the text component: JTextArea ta = new JTextArea(); Reader reader = new FileReader(filename); ta.read(reader, null); The second parameter is a description.