Duplicate :
|
|
Duplicate :
|
|
Relates :
|
AWT Robot has two constructors that initialize instance differently. Robot(GraphicsDevice) constructor does not invoke default constructor implementation and by this reason misses initialization of LEGAL_BUTTON_MASK variable. Improper initialization of LEGAL_BUTTON_MASK could bring to an exception. Exception in thread "main" java.lang.IllegalArgumentException: Invalid combination of button flags at java.awt.Robot.checkButtonsArgument(Robot.java:325) at java.awt.Robot.mousePress(Robot.java:257) at FileListBetweenJVMsTest.<init>(FileListBetweenJVMsTest.java:119) at FileListBetweenJVMsTest.main(FileListBetweenJVMsTest.java:150) The exception is caused by the fact that LEGAL_BUTTON_MASK value is 0.
|