Skip to content

Commit

Permalink
8320349: Simplify FileChooserSymLinkTest.java by using single-window …
Browse files Browse the repository at this point in the history
…testUI

Backport-of: b1cb37432a4b4a10ba68f468e4d988f2a935f198
  • Loading branch information
GoeLin committed Apr 11, 2024
1 parent dc53669 commit db750ff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -118,7 +116,7 @@ public static void main(String[] args) throws Exception {
.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");
Expand Down Expand Up @@ -159,6 +157,6 @@ public void propertyChange(PropertyChangeEvent evt) {
frame.add(panel, BorderLayout.NORTH);
frame.add(jfc, BorderLayout.CENTER);
frame.pack();
return List.of(frame);
return frame;
}
}

1 comment on commit db750ff

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.