3 ms·
Java FX does look pretty, but the menu bar implementation is as broken as the one in Swing: * Switching to a different window with alt-tab will have moved keyb
by ptx 8y ago
Java FX does look pretty, but the menu bar implementation is as broken as the one in Swing:
* Switching to a different window with alt-tab will have moved keyboard focus to the menu bar when you switch back.
* Holding down the mouse button, pointing at menus to open them and releasing to activate an item – the way people did it in ancient times and which has been supported everywhere forever – does not work.
* To avoid submenus disappearing as you try to move the cursor towards them, GUI toolkits use either a small delay or something more clever to keep the submenu for a bit while you try to reach it. Except for Swing and JavaFX, which do neither, leading to a frustrating user experience. Interestingly, they have documented the correct behaviour in the JavaFX wiki[1], but it's apparently not implemented. (They had similar design documentation on the Swing wiki, which I can't find now, which was also never implemented.)
(The Swing menu bar is broken in many similar ways, but in case someone is wondering why it works in IntelliJ, they implemented[2] the expected behaviour themselves.)
[1] https://wiki.openjdk.java.net/display/OpenJFX/Menu+User+Experience+Documentation https://wiki.openjdk.java.net/display/OpenJFX/Menu+User+Expe...
[2] https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeMenuBar.java https://github.com/JetBrains/intellij-community/blob/master/...