<Swing Dev> [10] RFR JDK-8173739: JPopupMenu does not disappear on KeyEvent

Sergey Bylokhov sergey.bylokhov at oracle.com
Mon Jul 3 18:31:10 UTC 2017


There are a few questions which should be clarified, because from the first look we should updated some other method.

 - The updated method is protected and have no any information in the specification that it can post ungrab event.
 - If there are a few listeners then the code will post a few ungrab events. It is also interesting when the grab event is posted?

----- prasanta.sadhukhan at oracle.com wrote:

> Hi All,
> 
> Please review a fix for an issue where it is seen that if a popup menu
> 
> is shown in an internal frame and
> another internal frame is shown on top of 1st frame, then even though
> 
> 1st internal frame gets hidden, the popup is still visible.
> 
> Issue was popup menu was not getting cancelled when the 1st internal 
> frame gets hidden/deactivated.
> Poprosed fix is to send an UngrabEventwhen the 1st internal frame gets
> 
> deactivated
>   so that BasicPopupMenuUI can catch the UngrabEvent and cancel the 
> popupmenu .
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8173739
> webrev: http://cr.openjdk.java.net/~psadhukhan/8173739/webrev.00/
> 
> Regards
> Prasanta



More information about the swing-dev mailing list