java - JavaFX: JFXPanel in JFrame - Prevent JMenuBar mnemonics -


i have jfxpanel's contained within jframe has jmenubar top. menus have mnemonics associated them, though jfxpanel's have button's mnemonics associates them well. pressing alt + c invokes jfxpanel close button action, opens collections menu jmenubar. suggestions how handle?

adding jfxpanel did trick:

this.addkeylistener(new keylistener() {   @override   public void keytyped(keyevent e) {     if(e.isaltdown()) {       e.consume();     }   }   @override   public void keyreleased(keyevent e) {     if(e.isaltdown()) {       e.consume();     }   }   @override   public void keypressed(keyevent e) {     if(e.isaltdown()) {       e.consume();     }   } }); 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -