RFR: 8294067: [macOS] javax/swing/JComboBox/6559152/bug6559152.java Cannot select an item from popup with the ENTER key. [v2]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Tue Sep 20 17:11:47 UTC 2022
On Tue, 20 Sep 2022 17:02:14 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
>> The newly fix-sized JComboBox has its dropdown menu opened with this test's mouse click. The goal of the test is to focus the JComboBox, open the dropdown menu, and select the 2nd option of the menu using arrow keys and ENTER key. Since the JComboBox is focused without the click already, the click can be removed.
>
> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>
> Re-add click. Update mouse position
test/jdk/javax/swing/JComboBox/6559152/bug6559152.java line 101:
> 99:
> 100: private static void test() throws Exception {
> 101: robot.mouseMove(p.x + cb.getWidth() / 2, p.y + cb.getHeight() / 2);
Since `cb` is swing component, appropriate will be to do
(Dimension) d = comp.getSize(); inside blockTillDisplayed() which is called in EDT
and use mouseMove(p.x + d.width/2, p.y + d.height/2)
-------------
PR: https://git.openjdk.org/jdk/pull/10359
More information about the client-libs-dev
mailing list