setDocument(x.loadDocument(filename),new File(filename).toURL());
URL url = new File(filename).toURL(); setDocument(loadDocument(url),url);
    public void setDocument(String filename) throws Exception {        setDocument(x.loadDocument(filename),new File(filename).toURL());    }