Hi
I am using jdk1.2-pre2 glibc2.0 on RedHat5.2
I have to menuitems one with shortcut Ctrl+O and the other with shurtcut
Chtrl+I
Ctrl+O worls fine, Ctrl+I is almost always ignored and sometimes even
causes application to stop responding.
No exceptions or other errors are thrown.

The code where I add shortcuts:


      JMenuBar menuBar = new JMenuBar();
      JMenu menu;
      JMenuItem menuItem;

      frame.setJMenuBar(menuBar);

      menu = new JMenu("View");
      . . .
      menuItem = new JMenuItem("Zoom In");
      menuItem.setAccelerator(KeyStroke.getKeyStroke
         (KeyEvent.VK_I, ActionEvent.CTRL_MASK));
      menuItem.setMnemonic(KeyEvent.VK_I);
      menuItem.addActionListener(this);
      menu.add(menuItem);
      menuItem = new JMenuItem("Zoom Out");
      menuItem.setAccelerator(KeyStroke.getKeyStroke
         (KeyEvent.VK_O, ActionEvent.CTRL_MASK));
      menuItem.setMnemonic(KeyEvent.VK_O);
      menuItem.addActionListener(this);
      menu.add(menuItem);


isn't it strange?

-mk

P.S. and, btw, thanks for great port!


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to