posted 16 years ago
Respectde Friends,
I am facing a very strange problem in a very small and simple program, I am using java.awt.Robot class which can virtually press any key stroke.The program is as follows:
But I get the following exception
java.lang.IllegalArgumentException: Invalid key code
Why my program is not accepting KeyEvent.VK_COPY,it is a variable of KeyEvent class than it should be accepted, it returns integer value.Please tell the reason of exception.
Thanking You,
Bilal Ali.