I am wondering how to make my Java program simulate a right click. So imagine your mouse cannot right click anymore. How do I make Java simulate the right click? Im planning to have a button that u press on a JFrame that simulates the right click after x seconds. Thanks and please try to include some code and not just links
Share
The
java.awt.Robotapi was designed for exactly this. It has lots of goodies in it!Specifically in this case, mousePress and mouseRelease.
P.S. Yes I realize they’re just links. But in all honesty, learning to read API docs and make code from them effectively is a skill every developer needs!