|
发表于 2004-9-9 09:24:30
|
显示全部楼层
看看是不是这样的:
- jMenuFile.setText("File");
- jMenuFile.setMnemonic('F');
- jMenuFileNew.setText("New");
- jMenuFileNew.setMnemonic('N');
- jMenuFileNew.setAccelerator(KeyStroke.getKeyStroke((int)'N',java.awt.event.InputEvent.CTRL_MASK));
- jMenuFileOpen.setText("Open");
- jMenuFileOpen.setMnemonic('O');
- jMenuFileOpen.setAccelerator(KeyStroke.getKeyStroke((int)'O',java.awt.event.InputEvent.CTRL_MASK));
- jMenuFileSave.setText("Save");
- jMenuFileSave.setMnemonic('S');
- jMenuFileSave.setAccelerator(KeyStroke.getKeyStroke((int)'S',java.awt.event.InputEvent.CTRL_MASK));
- jMenuFileSaveAs.setText("Save as");
- jMenuFileSaveAs.setMnemonic('A');
- jMenuFileClose.setText("Close");
- jMenuFileClose.setMnemonic('C');
- jMenuFilePageSetup.setText("Page Setup");
- jMenuFilePageSetup.setMnemonic('U');
- jMenuFilePrint.setText("Print");
- jMenuFilePrint.setMnemonic('P');
- jMenuFilePrint.setAccelerator(KeyStroke.getKeyStroke((int)'P',java.awt.event.InputEvent.CTRL_MASK));
- jMenuFileExit.setText("Exit");
- jMenuFileExit.setMnemonic('X');
- jMenuEdit.setText("Edit");
- jMenuEdit.setMnemonic('E');
- jMenuEditUndo.setText("Undo");
- jMenuEditUndo.setMnemonic('U');
- jMenuEditUndo.setAccelerator(KeyStroke.getKeyStroke((int)'Z',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditRedo.setText("Redo");
- jMenuEditRedo.setMnemonic('O');
- jMenuEditRedo.setAccelerator(KeyStroke.getKeyStroke((int)'R',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditCut.setText("Cut");
- jMenuEditCut.setMnemonic('T');
- jMenuEditCut.setAccelerator(KeyStroke.getKeyStroke((int)'X',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditCopy.setText("Copy");
- jMenuEditCopy.setMnemonic('C');
- jMenuEditCopy.setAccelerator(KeyStroke.getKeyStroke((int)'C',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditPaste.setText("Paste");
- jMenuEditPaste.setMnemonic('P');
- jMenuEditPaste.setAccelerator(KeyStroke.getKeyStroke((int)'V',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditDelete.setText("Delete");
- jMenuEditDelete.setMnemonic('L');
- jMenuEditDelete.setAccelerator(KeyStroke.getKeyStrokeForEvent(KeyEvent.VK_DELETE));
- jMenuEditFind.setText("Find");
- jMenuEditFind.setMnemonic('F');
- jMenuEditFind.setAccelerator(KeyStroke.getKeyStroke((int)'F',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditFindNext.setText("Find Next");
- jMenuEditFindNext.setMnemonic('N');
- jMenuEditFindNext.setAccelerator(KeyStroke.getKeyStrokeForEvent(KeyEvent.VK_F3));
- jMenuEditReplace.setText("Replace");
- jMenuEditReplace.setMnemonic('R');
- jMenuEditReplace.setAccelerator(KeyStroke.getKeyStroke((int)'H',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditGoto.setText("Goto");
- jMenuEditGoto.setMnemonic('G');
- jMenuEditGoto.setAccelerator(KeyStroke.getKeyStroke((int)'G',java.awt.event.InputEvent.CTRL_MASK));
- jMenuEditSelectAll.setText("Select All");
- jMenuEditSelectAll.setMnemonic('A');
- jMenuEditSelectAll.setAccelerator(KeyStroke.getKeyStroke((int)'A',java.awt.event.InputEvent.CTRL_MASK));
复制代码 |
|