Meaningless Drivel is fun!*
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Difference between Robot & EventQueue class?" Watch "Difference between Robot & EventQueue class?" New topic
Author

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
Sheriff

Joined: Oct 27, 2005
Posts: 19718
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
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?