Frage

I know that Robot class in java is used to generateInputevents such as mouseMove,press and release and also keyevents ,i know only the functionality i.e if i call mouseMove(x,y) mousepointer will move to the (x,y) position.I don't know ,Actually what happens inside i.e what are the steps take by JVM to interact with os to move the mouse pointer and other events?

War es hilfreich?

Lösung

The nice thing about the Java library is that a lot of it is opensource. A quick glance through it shows that on Unix-ish platforms it creates a XToolkit and then there's a lot of interfacing with the X11 library to send keyboard and mouse events.

In particular, all of the events are eventually dispatched to sun.awt.X11.XRobotPeer, who then dispatches them to awt_Robot.c who then calls various X11 functions to produce particular events.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top