> How do you make it so a JSlider can be moved by clicking where you want it
> to be?
>
> The default behavior seems to only allow dragging it.
>
> I've downloaded the demo's from
http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html#labels
> and the JSliders are moveable by clicking.
>
[quoted text clipped - 3 lines]
>
> Jim
Do you by any chance have a massive range eg minVal = 0 maxVal > 500
The bigger the range the smaller the pointer movement when you click the
track. Try a tiny range to compare.
You can may be able to use a smaller range and convert this to the model
data you require.
--
Mike W
Jim Moon - 11 Jun 2004 20:10 GMT
Thank you, Mike!
The JSlider does work better with proportionately smaller ranges.
Jim
Will Hartung - 14 Jun 2004 22:21 GMT
> Thank you, Mike!
>
> The JSlider does work better with proportionately smaller ranges.
The key seems that the click to the right or left of the slide means "up" or
"down" rather than "go to here".
Otherwise, the resolution wouldn't matter.
Regards,
Will Hartung
(willh@msoft.com)