RFR: 8354214: Open source Swing tests Batch 2 [v2]
Jayathirth D V
jdv at openjdk.org
Tue Apr 15 07:40:39 UTC 2025
On Mon, 14 Apr 2025 11:26:18 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update after review
>
> test/jdk/javax/swing/JList/bug4193267.java line 44:
>
>> 42: import java.awt.Color;
>> 43: import java.awt.FlowLayout;
>> 44: import java.awt.GridLayout;
>
> awt imports can be moved before swing here and in other tests too
Updated.
> test/jdk/javax/swing/JList/bug4193267.java line 64:
>
>> 62: .positionTestUI(WindowLayouts::rightOneRow)
>> 63: .columns(35)
>> 64: .testUI(initialize())
>
> Suggestion:
>
> .testUI(bug4193267::initialize)
Updated.
> test/jdk/javax/swing/JList/bug4193267.java line 77:
>
>> 75: JList lst;
>> 76: JScrollPane jsp;
>> 77: JTextField first, last;
>
> Can be removed.
Updated.
> test/jdk/javax/swing/JList/bug4193267.java line 80:
>
>> 78: JFrame[] fr = new JFrame[2];
>> 79: fr[0] = new JFrame("JList");
>> 80: lst = new JList(data);
>
> separate declaration can be removed for JList, JScrollPane and JTextField
>
> Suggestion:
>
> JList lst = new JList(data);
Updated.
> test/jdk/javax/swing/JList/bug4193267.java line 83:
>
>> 81: lst.setLayoutOrientation(JList.VERTICAL_WRAP);
>> 82: lst.setVisibleRowCount(4);
>> 83: jsp = new JScrollPane(lst);
>
> Suggestion:
>
> JScrollPane jsp = new JScrollPane(lst);
Updated.
> test/jdk/javax/swing/JList/bug4193267.java line 94:
>
>> 92: JPanel p = new JPanel();
>> 93: p.setLayout(new GridLayout(2, 1));
>> 94: first = new JTextField("0", 2);
>
> Suggestion:
>
> JTextField first = new JTextField("0", 2);
Updated.
> test/jdk/javax/swing/JList/bug4193267.java line 98:
>
>> 96: first.setBackground(Color.white);
>> 97: p.add(first);
>> 98: last = new JTextField("9", 2);
>
> Suggestion:
>
> JTextField last = new JTextField("9", 2);
Updated.
> test/jdk/javax/swing/JList/bug4249161.java line 59:
>
>> 57: .instructions(INSTRUCTIONS)
>> 58: .columns(35)
>> 59: .testUI(initialize())
>
> Suggestion:
>
> .testUI(bug4249161::initialize)
Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043828131
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043829261
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043834068
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043834326
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043834665
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043835525
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043835852
PR Review Comment: https://git.openjdk.org/jdk/pull/24588#discussion_r2043837819
More information about the client-libs-dev
mailing list