try { FileDialog fd = new FileDialog(root.frame, "Open a local file", FileDialog.LOAD); fd.show(); if (fd.getFile() != null) { String url = new File(fd.getDirectory(), fd.getFile()).toURI().toURL().toString(); root.panel.loadPage(url); } } catch (Exception ex) { logger.info("error:" + ex); }
openAndShowFile();
                    public void actionPerformed(ActionEvent evt) {                        try {                            FileDialog fd = new FileDialog(root.frame, "Open a local file", FileDialog.LOAD);                            fd.show();                            if (fd.getFile() != null) {                                String url = new File(fd.getDirectory(), fd.getFile()).toURI().toURL().toString();                                root.panel.loadPage(url);                            }                        } catch (Exception ex) {                            logger.info("error:" + ex);                        }                    }