root.panel.view.stop();
    public void init() {        URL url = null;        url = this.getClass().getClassLoader().getResource("images/Stop24.gif");        stop = new AbstractAction("", new ImageIcon(url)) {            public void actionPerformed(ActionEvent evt) {                // TODO: stop not coded                System.out.println("stop called");                root.panel.view.stop();            }        };        // TODO: need right API call for ESC        //stop.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE));        stop.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_S));        open_file =                new AbstractAction() {                    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);                        }                    }                };        open_file.putValue(Action.NAME, "Open File...");        setAccel(open_file, KeyEvent.VK_O);        setMnemonic(open_file, new Integer(KeyEvent.VK_O));        print = new PrintAction(root);        setAccel(print, KeyEvent.VK_P);        setMnemonic(print, new Integer(KeyEvent.VK_P));        quit =                new AbstractAction() {                    public void actionPerformed(ActionEvent evt) {                        System.exit(0);                    }                };        setName(quit, "Quit");        setAccel(quit, KeyEvent.VK_Q);        setMnemonic(quit, new Integer(KeyEvent.VK_Q));        cut = new EmptyAction("Cut", KeyEvent.VK_X);        cut.setEnabled(false);        setMnemonic(cut, new Integer(KeyEvent.VK_T));        copy = new CopySelectionAction(root);        copy.setEnabled(true);        copy.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke(KeyEvent.VK_C,                        Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));        setMnemonic(copy, new Integer(KeyEvent.VK_C));        setName(copy, "Copy");        paste = new EmptyAction("Paste", KeyEvent.VK_V);        paste.setEnabled(false);        setMnemonic(paste, new Integer(KeyEvent.VK_P));        url = this.getClass().getClassLoader().getResource("images/StepBack24.gif");        backward = new AbstractAction("", new ImageIcon(url)) {            public void actionPerformed(ActionEvent evt) {                try {                    root.panel.goBack();                    root.panel.view.repaint();                } catch (Exception ex) {                    Uu.p(ex);                }            }        };        backward.setEnabled(false);        backward.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT,                        InputEvent.ALT_MASK));        url = this.getClass().getClassLoader().getResource("images/StepForward24.gif");        forward = new AbstractAction("", new ImageIcon(url)) {            public void actionPerformed(ActionEvent evt) {                try {                    root.panel.goForward();                    root.panel.view.repaint();                } catch (Exception ex) {                    Uu.p(ex);                }            }        };        forward.setEnabled(false);        forward.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT,                        InputEvent.ALT_MASK));        url = this.getClass().getClassLoader().getResource("images/Refresh24.gif");        refresh = new EmptyAction("", new ImageIcon(url)) {            public void actionPerformed(ActionEvent evt) {                try {                    root.panel.view.invalidate();                    root.panel.view.repaint();                } catch (Exception ex) {                    Uu.p(ex);                }            }        };        refresh.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke("F5"));        url = this.getClass().getClassLoader().getResource("images/Refresh24.gif");        reload = new EmptyAction("", new ImageIcon(url)) {            public void actionPerformed(ActionEvent evt) {                try {                    root.panel.reloadPage();                    root.panel.view.repaint();                } catch (Exception ex) {                    Uu.p(ex);                }            }        };        reload.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke(KeyEvent.VK_F5,                        InputEvent.SHIFT_MASK));        reload.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_R));        print_preview = new EmptyAction("Print Preview") {            public void actionPerformed(ActionEvent evt) {                try {                    root.panel.view.setPageInfo(root.panel.view.getPageInfo() == null ? PageInfo.LETTER : null);                    print_preview.putValue(Action.NAME,                            root.panel.view.getPageInfo() == null ? "Print Preview" : "Normal View");                    root.panel.reloadPage();                    root.panel.view.repaint();                } catch (Exception ex) {                    Uu.p(ex);                }            }        };        print_preview.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_V));        load = new AbstractAction("Load") {            public void actionPerformed(ActionEvent evt) {                try {                    String url_text = root.panel.url.getText();                    root.panel.loadPage(url_text);                    root.panel.view.repaint();                } catch (Exception ex) {                    Uu.p(ex);                }            }        };        generate_diff = new GenerateDiffAction(root);        increase_font = new FontSizeAction(root, FontSizeAction.INCREMENT);        increase_font.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke(KeyEvent.VK_PLUS,                        Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));        increase_font.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_I));        reset_font = new FontSizeAction(root, FontSizeAction.RESET);        reset_font.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke(KeyEvent.VK_0,                        Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));        reset_font.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_N));        decrease_font = new FontSizeAction(root, FontSizeAction.DECREMENT);        decrease_font.putValue(Action.ACCELERATOR_KEY,                KeyStroke.getKeyStroke(KeyEvent.VK_MINUS,                        Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));        decrease_font.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_D));        setName(increase_font, "Increase");        setName(reset_font, "Normal");        setName(decrease_font, "Decrease");    }