Code example for FileReader

0
            return; 
        } 
        String filename = args[0];
        Template t = null;
        try { 
            t = new Template(filename, new FileReader(filename));
        } catch (Exception e) {
            e.printStackTrace();
            return; 
        } 
        showTree(t);
    } 
 
    static void showTree(Template t) {
        JTree tree = new FreeMarkerTree(t);
        JFrame jf = new JFrame(t.getName());
        jf.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            } 
        });