Java trackpad 2-finger scroll listener

后端 未结 3 770
温柔的废话
温柔的废话 2020-12-19 07:12

how can i detect a 2-finger scroll on a laptop trackpad in java? I\'ve been searching google and here but can\'t find anything on scrolling using a trackpad let alone how to

3条回答
  •  渐次进展
    2020-12-19 07:49

    If this is about listening for user scrolls, you can do it by adding a MouseWheelListener to your control. See How to Write a Mouse-Wheel Listener for more information.

    If this is about detecting specific events from the trackpad and not the mouse, I don't known of any Java feature to implement this.

提交回复
热议问题