Link to home
Start Free TrialLog in
Avatar of mb2297
mb2297

asked on

JSlider with non-integer tick marks

Hello experts,

I'm using a JSlider and I need it to have non-integer tick marks -- for example a range from 0.1 to 0.6 with minor ticks every 0.05.

I can't believe this isn't possible, but the API doesn't agree. Does such a thing exist?

Thanks,
Matt.

ASKER CERTIFIED SOLUTION
Avatar of Tommy Braas
Tommy Braas
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mb2297
mb2297

ASKER

Surely the tick labels with then be 20 to 120?
You didn't ask about tick labels, but rather the bounds and the tick values themselves.

However, it is easy to change the labels. Have a look at the "Customizing Labels on a Slider" section on http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html
Avatar of mb2297

ASKER

Great, thanks.