Java Swing 添加快捷键

openJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,InputEvent.CTRL_MASK)); 

你可能感兴趣的:(java,swing)