Reputation: 31020
Is it possible to display two set of labels with the same ticks on JSlider, one on top, one on bottom?
Upvotes: 2
Views: 539
Reputation: 205785
You can implement your own SliderUI
, as shown here, and override paintTicks()
.
Alternatively, you may be trying to represent alternate units, such as Celsius v. Kelvin. You might want to consider one of these options:
Add an adjacent toggle button to switch the displayed tick units.
Add a second JSlider
and let each one's ChangeListener
set the other's model to the equivalent setting.
Upvotes: 1