aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Difference between Robot & EventQueue class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Difference between Robot & EventQueue class?" Watch "Difference between Robot & EventQueue class?" New topic

Difference between Robot & EventQueue class?

Thennam Pandian
Ranch Hand

Joined: Oct 11, 2005
Posts: 163
We can use both Robot class & Event Queue to trigger AWT events.

What is the difference between these two approach?
Which is the best one to use?

What is the ideal scenario to use these classes?
Rob Spoor

Joined: Oct 27, 2005
Posts: 19896

EventQueue can only create events for the current Java application. The mouse and key events generated by Robot are sent through the operating system and can therefore send events to any application, as long as it's visible on the desktop.

How To Ask Questions How To Answer Questions
subject: Difference between Robot & EventQueue class?