The question is pretty simple. I couldn't find many links regarding this issue, and the ones I found didn't seemed to avoid the real question. My application must handle the mouse pressed/released events for the back and forward mouse buttons. How can I handle this?
EDIT: This is using JDK 1.6.
Check if additional mouse buttons are detected by calling:
MouseInfo.getNumberOfButtons();
Check if MouseEvents are fired when you click those additional buttons. If so, what does MouseInfo.getButton()
return?
According to the javadocs for MouseInfo.getButton():
If a mouse with five buttons is installed, this method may return the following values:
* 0 (NOBUTTON) * 1 (BUTTON1) * 2 (BUTTON2) * 3 (BUTTON3) * 4 * 5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With