On Mon, 7 Feb 2022 15:23:57 GMT, Manukumar V S <[email protected]> wrote:

>> Create a regression test for 
>> [JDK-4515999](https://bugs.openjdk.java.net/browse/JDK-4515999)
>> Create a test which checks whether incrementing dates via the keyboard 
>> (up/down) gives the same results as when using mouse press on the arrow 
>> buttons in a JSpinner.
>
> Manukumar V S has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Fixed review comments: JSpinner access in EDT,formatting 
> changes,BUTTON1_DOWN_MASK,Copyright header

test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java line 
111:

> 109:                     spinnerEditorWidth = spinner.getEditor().getWidth();
> 110:                     spinnerButtonWidth = spinner.getWidth() - 
> spinnerEditorWidth;
> 111:                     spinnerQuarterHeight = spinner.getHeight() / 4;

I'm unsure it's valid to get the location on screen right after calling 
`setVisible(true)` on the frame. The size of the spinner should be valid but 
the location may be `null`. I suggest calling `getLocationOnScreen()` in 
another `invokeAndWait` to let the EDT one process the events after making the 
frame visible on the screen.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7363

Reply via email to