• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Robot & EventQueue class?

 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20559
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic