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
Post a Comment