Example usage for javax.swing.text JTextComponent read

List of usage examples for javax.swing.text JTextComponent read

Introduction

In this page you can find the example usage for javax.swing.text JTextComponent read.

Prototype

public void read(Reader in, Object desc) throws IOException 

Source Link

Document

Initializes from a stream.

Usage

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();
}