Dr java for mac

broken image

I do, however, want to point out several important 'lessons learned': I won't describe this too much, because I think the Java code below speaks for itself. That being said, the Java Robot example code here demonstrates how to use the mouse and generate keyboard keystrokes into other system windows with the Java Robot class, and I think that's pretty cool. So, as a word of warning, when you see some of these other Java Robot class examples out there on the internet - be careful - the correct solution is not as easy as any other Java Robot example I've seen out here. When you use the Java Robot class, you’re poking your head out into the native operating system, and if you mess up with your GUI events - at least on a Mac OS X system - a lot of bad things can happen.įortunately I just kept losing keyboard input, but I was still able to use the mouse, and was able to reboot my system easily using the mouse.

broken image

Okay, what really happened is that while developing this Java Robot example code on my Mac, I had to reboot it about 10 times.

broken image

Java Robot class FAQ: Can you show me an example of how to use the Java Robot class?Īnswer: Um, yeah, sure.