setHelpMenu() doesn't work for MenuBar under Netscape 4.0.2

XMLWordPrintable

    • sparc
    • solaris_2.6

      Using JDK 1.1.3 and found following problem:

      Regarding of HelpMenu on Netscape's applet window:

      Test case:

      <<<<<<< Test.java >>>>>>>

      import java.applet.*;
      import java.awt.*;

      public class Test extends Applet
      {
        public void init() {
          new TestFrame();
        }
      }

      class TestFrame extends Frame
      {
        public TestFrame() {
          super("this is an applet window");

          createMenu();

          resize(500, 500);
          show();
        }

        private void createMenu() {
          MenuBar mb = new MenuBar();

          Menu fm = new Menu("File");
          fm.add(new MenuItem("Clar"));
          fm.addSeparator();
          fm.add(new MenuItem("Quit"));

          Menu hm = new Menu("Help");
          hm.add(new MenuItem("About"));

          mb.add(fm);
          mb.setHelpMenu(hm);
          setMenuBar(mb);
        }

        public boolean action(Event evt, Object obj) {
          if (evt.target instanceof MenuItem) {
            if ("Quit".equals((String)obj)) {
              hide();
              dispose();
              return true;
             }
           }
           return super.action(evt, obj);
        }
      }

      <<<<<<< Test.html >>>>>>>

      <html>
      <head><title>Testing</title>
      </head>

      <body>
      <H3><FONT COLOR=#00AA00>This is a test</FONT></H3>
      <applet code="Test.class" width=100 height=1>
      </applet>
      </body>
      </html>


      After you compile Test.java by 'javac Test.java', brought up Netscape and
      load Test.html file, you will notice that the Help menu is not on the menu bar!!

      This is a bug that Java Frame's menubar doesn't take setHelpMenu().

      Please note that, this works fine under HotJava and other browser. Only Netscape
      failed to display the HelpMenu.

      Thank you,
      Joseph


        

            Assignee:
            J. Duke
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: