• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Extending JSlider and MetalSliderUI

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Good night. Drive safely. Here's a tiny ad for the road:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic