java - How to disable CONTROL+PAGE_UP of a JTabbedPane? -


how disable default behavior of control+page_up , control+page_down of jtabbedpane?

the following code disables usual behavior

jtabbedpane jtabbedpane = new jtabbedpane(); keystroke ctrltab = keystroke.getkeystroke("ctrl page_down"); keystroke ctrlshifttab = keystroke.getkeystroke("ctrl page_up"); inputmap inputmap = jtabbedpane.getinputmap(jcomponent.when_ancestor_of_focused_component); inputmap.put(ctrltab, "none"); inputmap.put(ctrlshifttab, "none"); 

here example switching tab using ctrl + tab


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -