Q: Jan I automate mouseclicks in java
A: Yes, use java.awt.Robot
The Robot class in the Java AWT package is used to generate native system input events for the purposes of test automation, self-running demos.
https://docs.oracle.com/javase/8/docs/api/java/awt/Robot.html