wood burning stoves 2.0
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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: 19849

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
I agree. Here's the link: http://aspose.com/file-tools
subject: Difference between Robot & EventQueue class?