Hi All,

Please review a fix for an issue in macOS where it is seen that JSpinner keeps 
spinning while JOptionPane is shown on ChangeListener.

This is continuation of JDK-4840869 fix where it was fixed for BasicSpinnerUI 
but it still fails in macOS as AquaSpinnerUI has overridden the fixed method 
without the fix integrated.

The cause of this bug is that we get ChangeEvent on mousePress and transfer the 
focus to JOptionPane message dialog before the mouse is released, so we don’t 
stop the autorepeat timer and continue to increase the spinner value.
We need to stop this timer when spinner loses the focus.
So, the fix done for 4840869 is integrated for AquaSpinnerUI too whereby 
FocusListener is added for next/prev button and focusLost happens, we stop the 
autorepeat timer

The closed test is moved to open with following changes:
        - Name change
        - Swing components accessed in EDT
        - setAutoWaitForIdle() and setAutoDelay() added for test stability

Bug: https://bugs.openjdk.java.net/browse/JDK-8238824 
<https://bugs.openjdk.java.net/browse/JDK-8238824>
web rev: http://cr.openjdk.java.net/~psadhukhan/8238824/webrev.0/ 
<http://cr.openjdk.java.net/~psadhukhan/8238824/webrev.0/>

Regards
Prasanta 

Reply via email to