java - How to disable arrow keys for JSliders? -
i want use arrows keys move on screen after click on jslider
use , use arrows keys, moving slider instead of object. can’t find method disable this. (after clicking on slider, sliding arrow changes black outline blue 1 {my presumption indicating arrows keys “locked” onto slider.})
try slider.setfocusable(false);
but complex application, ensuring have control on arrows may require keyboardfocusmanager
, keyeventdispatcher
apis. these let divert arrow (or any) keystrokes normal handling, must used carefully.
Comments
Post a Comment