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

JMenu should stay selected after escape is pressed

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b07
    • CPU:
      generic, x86
    • OS:
      generic, windows_2000
    • Verification:
      Verified

      Description

      Run the following test, press to the Menu and select the item
      press escape button

      Actual: The menu becames unselected

      Expected: The menu is still selected

      JDK 1.6

      import javax.swing.*;

      public class MenuTest {
          public static void main(String[] args) throws Exception {
              final JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

              JMenuBar bar = new JMenuBar();
              JMenu menu = new JMenu("Menu");
              menu.setMnemonic('m');
              JMenuItem item = new JMenuItem("Item");
              menu.add(item);

              frame.setJMenuBar(bar);
              bar.add(menu);
              
              frame.setSize(200, 200);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alexp Alexander Potochkin (Inactive)
              Reporter:
              alexp Alexander Potochkin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: