According to the java.awt.AWTEvent source code and documentation, the maximum value for reserved AWT event IDs is RESERVED_ID_MAX that is equals to 1999.
But sun.awt.UngrabEvent has an ID of 65535.
It prevents relying on the RESERVED_ID_MAX to perform events filtering.
Documentation should be changed to make aware of this exception
UngrabEvent ID should be changed to a value below RESERVED_ID_MAX.
The testcase attached shows that a none user-defined AWT event with an ID over RESERVED_ID_MAX is called.
To reproduce, compile and execute the attached source code
% java MyCancas
Open the JCombobox and keep it opened
Then click outside the main JFrame and you will see that UngrabEvent is called.