RFR: 8327787: Convert javax/swing/border/Test4129681.java applet test to main [v3]
Alexey Ivanov
aivanov at openjdk.org
Tue Mar 12 09:12:16 UTC 2024
On Tue, 12 Mar 2024 03:29:26 GMT, Tejesh R <tr at openjdk.org> wrote:
>> Convert javax/swing/border/Test4129681.java applet test to main based test using PassFailJFrame.
>
> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>
> Review updates
Changes requested by aivanov (Reviewer).
test/jdk/javax/swing/border/Test4129681.java line 61:
> 59:
> 60: public static JComponent init() {
> 61: JCheckBox check = new JCheckBox("Enable/Disable");
Suggestion:
JLable label = new JLabel("message");
JCheckBox check = new JCheckBox("Enable/Disable");
And then both are local variables which you can use in lambda expressions.
test/jdk/javax/swing/border/Test4129681.java line 75:
> 73: main.add(Box.createVerticalStrut(4));
> 74: main.add(label);
> 75: main.add(Box.createVerticalGlue());
A `JPanel` with `BorderLayout` works better here, you can fill the area with the `JLabel`:
Suggestion:
JPanel main = new JPanel(new BorderLayout());
main.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
main.add(check, BorderLayout.NORTH);
main.add(label, BorderLayout.CENTER);
-------------
PR Review: https://git.openjdk.org/jdk/pull/18189#pullrequestreview-1930479454
PR Review Comment: https://git.openjdk.org/jdk/pull/18189#discussion_r1521101975
PR Review Comment: https://git.openjdk.org/jdk/pull/18189#discussion_r1521099890
More information about the client-libs-dev
mailing list