How do I initialize a JTextArea from an input file?

John Zukowski

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.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact