• Post Reply Bookmark Topic Watch Topic
  • New Topic

Extending JSlider and MetalSliderUI  RSS feed

 
chris paredes
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a custom knob, that will look like a radio dial or synth knob. The functionality will be the same as a JSlider, in that the knob control will be used to select a value by turning it. The only difference between it and a JSlider is that the JSlider goes up and down or side to side as apposed to turning. To make my knob control, I am extending the JSlider and MetalSliderUI classes. This is what I have so far. A knob control that uses a custom image for the "thumb", and that turns when I click in the track. However, when I click on the actual thumb image and move the mouse up and down, the thumb image still moves up and down the track on the y axis, and it also spins. When I click in the track though, it does not move up and down along the track. How in the heck do I disable the movement along the track when I click and hold the thumb image? I just want the thumb to spin. Not move with the mouse. Any ideas? Thanks! Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!