Pitched
JCHJava Community | Help. Code. Learn.
•Created by Pitched on 12/27/2024 in #java-help
How to properly implement scrolling a distance e.g with robot.mouseWheel()?
Hi, I am trying to recreate mouse scrolling behavior, but my current approach is only to set the amount of wheel turns with done with the wheel (using Robot). As far as I know it's dependent on the mouse settings given by the OS, that states what a notch turn does.
However, does somebody know if it's possible to recreate behavior, that scrolls a certain amount of pixels? I need a fairly precise scroll where I can set the distance and I'm not sure how to achieve that.
Hope my explanation was sufficient, any help is appreciated!
4 replies
JCHJava Community | Help. Code. Learn.
•Created by Pitched on 4/18/2024 in #java-help
Java Robot.mouseMove() stops working without apparent reason
Hi, I am currently developing a tool, which utlilized the "Robot" class alot to perform mouse and key actions. I closed the working version of my code and reopened, after which not a single move action is being performed. Relaunching Eclipse doesn't fix the issue. Mouse press and release functions do work however.
All parts of my program functioned as expected when I closed out of the software the last time and the issue occured immediately when testing the functionality again.
I am not getting any errors, but also not the behavior I want.
Does somebody know how I could approach fixing it?
Any help is appreciated!
4 replies