On Mon, 7 Apr 2025 22:50:14 GMT, Alisen Chung <ach...@openjdk.org> wrote:

> Updating and opening some tests

test/jdk/javax/swing/JComboBox/bug4530952.java line 120:

> 118: 
> 119:         btnAction.setEnabled(false);
> 120:         frame.getContentPane().add(btnAction);

all redundant getContentPane() can be removed

test/jdk/javax/swing/JComboBox/bug4530953.java line 80:

> 78:         if (frame != null) {
> 79:             SwingUtilities.invokeAndWait(() -> frame.dispose());
> 80:         }

dispose should be in try-finally block..

test/jdk/javax/swing/JComboBox/bug4530953.java line 89:

> 87:         combo.setSelectedIndex(1);
> 88:         frame.getContentPane().setLayout(new FlowLayout());
> 89:         frame.getContentPane().add(combo);

getContentPane can be removed..

test/jdk/javax/swing/JComboBox/bug4530953.java line 91:

> 89:         frame.getContentPane().add(combo);
> 90:         frame.setLocationRelativeTo(null);
> 91:         frame.pack();

guess setLocationRelativeTo should be called after pack..there was an issue if 
it is called before..

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038813345
PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038813716
PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038815506
PR Review Comment: https://git.openjdk.org/jdk/pull/24495#discussion_r2038815053

Reply via email to