-
Enhancement
-
Resolution: Fixed
-
P4
-
7u7
In traditional AWT or Swing UI development we listen for context menu requests using the MouseEvent.isPopupTrigger method or the KeyEvent.VK_CONTEXT_MENU constant. Consequently, many Java developers will look at the JavaFX MouseEvent and KeyEvent and wonder where this stuff has gone.
It turns out, that JavaFX has a much better model, where a specific ContextMenuEvent is fired, when the user requests the context menu using the mouse or keyboard.
To make JavaFX more accessible for long-term Java developers I recommend mentioning this in the docs for MouseEvent and KeyEvent with a comment such as
"To handle mouse or keyboard events that triggers the context menu, see the ContextMenuEvent."
It turns out, that JavaFX has a much better model, where a specific ContextMenuEvent is fired, when the user requests the context menu using the mouse or keyboard.
To make JavaFX more accessible for long-term Java developers I recommend mentioning this in the docs for MouseEvent and KeyEvent with a comment such as
"To handle mouse or keyboard events that triggers the context menu, see the ContextMenuEvent."
- relates to
-
JDK-8101750 Keyboard-triggered ContextMenuEvent needs better default coordinates
-
- Resolved
-