/Users/lyon/j4p/src/futils/SimpleWriter.java

1    package futils; 
2     
3    import java.io.FileWriter; 
4    import java.io.IOException; 
5    import java.io.PrintWriter; 
6     
7    public class SimpleWriter extends PrintWriter { 
8     
9     
10       public SimpleWriter() throws IOException { 
11           super( 
12                   new FileWriter( 
13                           Futil.getWriteFile("select input file"))); 
14       } 
15    
16       public static void main(String args[]) { 
17           try { 
18               SimpleWriter sw = new SimpleWriter(); 
19               sw.println("This is a writer that lets the user output to a GUI based file"); 
20               sw.close(); 
21           } catch (IOException e) { 
22               e.printStackTrace(); 
23           } 
24       } 
25   }