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

New Menu API should support concept of a single appwide menubar, and work properly on Mac



      We are designing a new api for the menubar. I'd like to request two features of this API:

      1) the api should include the concept of a single menu bar. Some operating systems have a single menubar for the whole app. Other OSes have a menubar per stage. Today the single menubar is only on Mac, but this concept will be more widespread as we move into netbooks and mobile OSes. Historically the Swing menubar api has not supported this concept, resulting in lots of buggy hacks to implement a single menubar on Mac. If the API supported this concept initially then we wouldn't need hacks.

      2) the implementation of this new menubar API should work properly on Mac. For the old Swing toolkit this should be pretty easy because Apple's implementation of JMenuBar can already do the event forwarding from a native Mac menubar. We just need to write our wrapper properly. However, the Prism toolkit probably won't use the Swing painting thread, and ideally won't load AWT or Swing at all. This means we will lose the work done by the Apple Java team. We will have to implement the hooks to the native menus on our own. To make this clean we need the API to support it (see feature #1).


          Issue Links



              • Assignee:
                leifs Leif Samuelsson (Inactive)
                jmarinacsunw Joshua Marinacci (Inactive)
              • Votes:
                4 Vote for this issue
                12 Start watching this issue


                • Due: