In my Java application, I have a couple JSliders that cover a very wide range, say -16384 to + 32767. Resolution when dragging the knob is something like 250. If I select the knob I can increment it by +/- 1 with the arrow keys but that is ridiculously slow. I think I've seen implementations (not necessarily Java Swing) where you can hold down a key and then the knob slider increments are much smaller. I'm looking for an example of this in action or some suggestion as to how to go about it.
So far all I've done is to read through the documentation here:
https://docs.oracle.com/javase/tutorial/uiswing/components/slider.html
TIA,
DL
There are several possible methods, such as setting
JSlider#setSnapToTicks(true); JSlider#setMajorTickSpacing()or performing anegative/positiveBlockIncrementaction instead of anegative/positiveUnitIncrementaction on the key pressed.