<Swing Dev> RFR JDK-8238824: [macos] javax/swing/JSpinner/4840869/bug4840869.java fails on macos
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Wed May 6 08:02:17 UTC 2020
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200506/106a67a1/attachment.htm>
More information about the swing-dev
mailing list