<Swing Dev> Fix for JDK-8065861 : Pressing Esc does not set 'canceled' property of ProgressMonitor

Ajit Ghaisas ajit.ghaisas at oracle.com
Wed Jun 8 14:35:49 UTC 2016


Hi,

Bug : 
https://bugs.openjdk.java.net/browse/JDK-8065861

Issue : 
Pressing Esc does not set 'canceled' property of ProgressMonitor

Analysis :
ProgressMonitor option pane only gets hidden on pressing Escape key. 
It is not truly canceled as isCanceled() method continues to return false.

Fix :
On Pressing Escape key JOptionPane.CLOSED_OPTION value is set in JOptionPane from BasicOptionPaneUI.java.
This value is used as a condition in isCanceled() to identify ProgressMonitor is canceled by pressing Escape key.

Please review the webrev:
http://cr.openjdk.java.net/~aghaisas/8065861/webrev.00/

On review completion, I will raise a CCC request for documentation change.

Regards,
Ajit



More information about the swing-dev mailing list