On Thu, 24 Jul 2025 18:51:41 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> typo > > src/java.desktop/share/classes/javax/swing/JPopupMenu.java line 961: > >> 959: popup.dispose(); >> 960: popup = null; >> 961: } > > This doesn't work for me on Windows. > > Well, the test passes because `jpm.isVisible()` returns `false` since `popup` > is set to `null`: > > https://github.com/openjdk/jdk/blob/4e53a9d9dfe7a1ac7c3d7402e5ca3a3d3fcbb709/src/java.desktop/share/classes/javax/swing/JPopupMenu.java#L881-L883 > > But the popup itself remains on the screen. All you have to do is call `setVisible(false)` (possibly ensuring that `isVisible()` returns `true` first). This will hide the popup menu and fire the relevant events which aren't sent now… and popup remains on the screen. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26407#discussion_r2229366856