Change System Volume by moving mouse up and down (JAVA)

Hey guys, what would be the best way to change system voume by moving the mouse up and down? Like I’d like to have a program that can choose between two different mice connected to the computer and then use one of them to change the system volume based on whether it is moved up or down. is it possible? im not sure how to begin really, aside from using MouseMotionListener…