Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I initialize a JTextArea from an input file?

file initialize input jtextarea
0
Posted

How do I initialize a JTextArea from an input file?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123