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

JMenuItem does not allow users to specify a hot-key label

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P1
    • 1.2.0
    • 1.1.4
    • client-libs
    • swing1.0fcs
    • generic
    • solaris_2.6
    • Verified

    Description


      Let's say, I have a "Add" menu item, and I want to indicate <Ins> as a hot-key (not a menu shortcut), there is no clean way to do this. Currently the
      only way that I can do this is:

      new JMenuItem("Add <Ins>");
      new JMenuItem("Delete <Del>");

      The problem with this approach is that you have to play with the spaces to make sure that all your menu items are aligned. The real problem occurs at the localisation centers.

      Note that Motif automatically performs the alignment automatically (after having specified the key accelerator)

      Attachments

        Issue Links

          Activity

            People

              gsaab Georges Saab
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: