Finding a tab character using
jmenuItem using \ t But it is not printing.
I'm sure this is really something fundamental that I'm missing. Here is the code
menuItem = new JMenuItem ("new \ tCtrl + N"); Thanks
Instead, try it:
menuItem = new gemenitium ("new"); MenuItem.setAccelerator (KeyStroke.getKeyStroke (KeyEvent.VK_N, ActionEvent.CTRL_MASK)); You should also add mnemonics to the utility:
menuItem.setMnemonic (KeyEvent.VK_N); See specifically for more explanation.
Comments
Post a Comment