• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSlider and "mouse click"

 
Velika Srbija
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSlider component behaves the same way (i.e. adjusting works OK) no matter if I click with left or right mouse click. But, I need to distinguish between left and right mouse click. How can I do that?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add a MouseListener to the slider and check the MouseEvent.getButton()
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!