8320349: Simplify FileChooserSymLinkTest.java by using single-window testUI

Reviewed-by: serb
This commit is contained in:
Alexey Ivanov 2023-12-05 17:40:55 +00:00
parent 18c7922781
commit b1cb37432a

@ -22,14 +22,12 @@
*/
import java.awt.BorderLayout;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.Arrays;
import java.util.List;
import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
@ -118,7 +116,7 @@ public class FileChooserSymLinkTest {
.awaitAndCheck();
}
private static List<Window> createTestUI() {
private static JFrame createTestUI() {
frame = new JFrame("JFileChooser Symbolic Link test");
panel = new JPanel(new BorderLayout());
multiSelection = new JCheckBox("Enable Multi-Selection");
@ -159,6 +157,6 @@ public class FileChooserSymLinkTest {
frame.add(panel, BorderLayout.NORTH);
frame.add(jfc, BorderLayout.CENTER);
frame.pack();
return List.of(frame);
return frame;
}
}