62,614
社区成员
发帖
与我相关
我的任务
分享
KeyStroke ctrlA = KeyStroke.getKeyStroke(KeyEvent.VK_A,InputEvent.CTRL_MASK);
Action doNothing = new AbstractAction(){
@Override public void actionPerformed(ActionEvent e){}
};
JTextPane textpane = ...;
textpane.getInputMap().put(ctrlA,"DO_NOTHING");
textpane.getActionMap().put("DO_NOTHING",doNothing);