List of usage examples for javax.swing.text JTextComponent read
public void read(Reader in, Object desc) throws IOException
From source file:LoadSave.java
public static void doLoadCommand(JTextComponent textComponent, String filename) throws Exception { FileReader reader = null;/*from w w w . ja v a 2 s . c o m*/ reader = new FileReader(filename); textComponent.read(reader, filename); reader.close(); }