JDK-6490814 : Robot.mousePress/Relase should also accept InputEvent.BUTTONx_DOWN_MASK
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-11-07
  • Updated: 2011-01-19
  • Resolved: 2009-05-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
7 b48Fixed
Related Reports
Relates :  
InputEvent spec :
"public static final int BUTTON1_MASK
    The Mouse Button1 modifier constant. It is recommended that BUTTON1_DOWN_MASK be used instead."
The same for other masks.

That time java.awt.Robot.mousePress/Release() says: 
"public void mousePress(int buttons)
    Presses one or more mouse buttons. The mouse buttons should be released using the mouseRelease method.
        buttons - the Button mask; a combination of one or more of these flags:
>>            * InputEvent.BUTTON1_MASK
>>            * InputEvent.BUTTON2_MASK
>>            * InputEvent.BUTTON3_MASK 

SUGGESTED FIX See 6315717.

EVALUATION awt_Robot.cpp do check for BUTTONx_MASKs only. It also should consider BUTTONx_DOWN_MASK. The same for awt_Robot.c

EVALUATION Robot should accept BUTTONx_DOWN_MASK values as well al BUTTONx_MASKs.