|
|
| Robot class |
Expert:sachin
hi!!! wenever i execute this code i get the error!! inputevent veriable not found!!!! i m using sdk 1.5!! plz tell me the problem if ny1 knws !!!
program is simple!!! but even the simplest one is not running!
import java.lang.*; import java.awt.*; public class Robot04{ public static void main(String[] args) throws AWTException{ Robot robot = new Robot();
robot.mouseMove(1005,10); robot.delay(2000); try{ robot.mousePress(InputEvent.BUTTON1_MASK);
robot.delay(2000);
robot.mouseRelease(InputEvent.BUTTON1_MASK); }catch(Exception e){System.out.println("Error"+ e);} } }
|
| Answers |
Hi Friend,
Import the package java.awt.event.* in your java code.The class InputEvent is in this package.
Thanks
|
thanks for the reply!!!! i was really frustrated due to this!!!!
|
| More Questions |
|
|
Post Answers
Ask Question
Facing Programming Problem?
|
|
|
|
|