cancelItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_cancel"));
cancelItem = new MenuItem(Messages.getString("StandaloneAppletWindow.MenuCancel"));
  StandaloneAppletWindow(AppletTag tag, List appletWindows)  {    appletWindows.add(this);    applet = Main.createApplet(tag);    if (contexts.get(tag.codebase) == null)      contexts.put(tag.codebase, new StandaloneAppletContext(appletWindows));    setLayout(new BorderLayout());    add(applet, BorderLayout.CENTER);    add(status, BorderLayout.SOUTH);    addWindowListener(new WindowAdapter()        {	  public void windowClosing(WindowEvent event)	  {	    applet.stop();	    StandaloneAppletWindow.this.hide();	    System.exit(0);	  }        });        addContainerListener(this);    addComponentListener(this);    addMouseListener(this);    addMouseMotionListener(this);    addInputMethodListener(this);    addHierarchyListener(this);    addHierarchyBoundsListener(this);        restartItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_restart"));    restartItem.setEnabled(false);    restartItem.addActionListener(this);    reloadItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_reload"));    reloadItem.setEnabled(false);    reloadItem.addActionListener(this);    cancelItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_cancel"));    cancelItem.setEnabled(false);    cancelItem.addActionListener(this);    saveItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_save"));    saveItem.setEnabled(false);    saveItem.addActionListener(this);    startItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_start"));    startItem.setEnabled(false);    startItem.addActionListener(this);    cloneItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_clone"));    cloneItem.setEnabled(false);    cloneItem.addActionListener(this);    closeItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_close"));    closeItem.setEnabled(false);    closeItem.addActionListener(this);    tagItem =      new MenuItem(Main.messages.getString("gcjwebplugin.menu_tag"));    tagItem.setEnabled(false);    tagItem.addActionListener(this);    infoItem =      new MenuItem(Main.messages.getString("gcjwebplugin.menu_info"));    infoItem.setEnabled(false);    infoItem.addActionListener(this);    editItem =      new MenuItem(Main.messages.getString("gcjwebplugin.menu_edit"));    editItem.setEnabled(false);    editItem.addActionListener(this);    editItem.setEnabled(false);    encodingItem =      new MenuItem(Main.messages.getString("gcjwebplugin.menu_encoding"));    encodingItem.setEnabled(false);    encodingItem.addActionListener(this);    printItem =      new MenuItem(Main.messages.getString("gcjwebplugin.menu_print"));    printItem.setEnabled(false);    printItem.addActionListener(this);    propertiesItem =      new MenuItem(Main.messages.getString("gcjwebplugin.menu_properties"));    propertiesItem.setEnabled(false);    propertiesItem.addActionListener(this);    quitItem = new MenuItem(Main.messages.getString("gcjwebplugin.menu_quit"));    quitItem.addActionListener(this);    MenuBar menuBar = new MenuBar();    Menu menuApplet = new Menu(Main.messages.getString("gcjwebplugin.menu_title"));    menuBar.add(menuApplet);    menuApplet.add(restartItem);    menuApplet.add(reloadItem);    menuApplet.add(cancelItem);    menuApplet.add(saveItem);    menuApplet.add(startItem);    menuApplet.add(cloneItem);    menuApplet.addSeparator();    menuApplet.add(tagItem);    menuApplet.add(infoItem);    menuApplet.add(editItem);    menuApplet.add(encodingItem);    menuApplet.addSeparator();    menuApplet.add(printItem);    menuApplet.addSeparator();    menuApplet.add(propertiesItem);    menuApplet.addSeparator();    menuApplet.add(closeItem);    menuApplet.add(quitItem);    setMenuBar(menuBar);    setTitle("GNU Classpath Applet Viewer: " + tag.code);    AppletContext context = (AppletContext) contexts.get(tag.codebase);    ((StandaloneAppletContext) context).addApplet(applet);    applet.setStub(new CommonAppletStub(tag, context, applet));    // Create the frame's peer. Otherwise getPreferredSize will read    // its insets as 0.    addNotify();    Insets i = getInsets();    Dimension size = tag.getSize();    setSize(i.left + size.width + i.right,            i.top + size.height + status.getPreferredSize().height            + i.bottom);    applet.setSize(size);    // Initialize the applet before showing this window so that the    // applet doesn't receive events before it has been initialized.    applet.init();    applet.start();    setVisible(true);  }