<Swing Dev> RFR JDK-8238824: [macos] javax/swing/JSpinner/4840869/bug4840869.java fails on macos
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed May 6 21:35:17 UTC 2020
Hi, Prasanta.
The fix looks fine, but can we improve the test and check all L&Fs? The same installListeners
is overridden in the SynthSpinnerUI, and it will be good to check that it works as well.
On 5/6/20 1:02 am, Prasanta Sadhukhan wrote:
> 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
> web rev: http://cr.openjdk.java.net/~psadhukhan/8238824/webrev.0/
>
> Regards
> Prasanta
--
Best regards, Sergey.
More information about the swing-dev
mailing list