Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4114924

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

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description

      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


        

        Attachments

          Activity

            People

            Assignee:
            duke J. Duke (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: