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

new MenuItem(null): causes application error/crash on Win32 JVM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.3
    • client-libs
    • None
    • x86
    • windows_nt



      Name: rlT66838 Date: 08/05/97


      Create a MenuItem and pass in "null"
      MenuItem mi = new MenuItem(null);

      add the menu item to a menu and then to a menubar
              Menu m = new Menu("File");
              MenuBar mb = new MenuBar();
              mb.add(m);
              m.add(mi);

      add the menubar to the frame
              Frame f = new Frame();
              f.setMenuBar(m);

      At that point, on NT it will cause an
      application error to occur. The Solaris JVM
      does not crash or even report an exception.


      BTW, if you're wondering why anyone would pass in
      a null, its because we are using a resource file,
      and the operator may not define a string for a
      menu item.


      ======================================================================

            feckssunw Fred Ecks (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: