Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
azvegint committed Mar 11, 2024
1 parent d33c317 commit a9f8e21
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions test/jdk/java/awt/FileDialog/MultipleMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Checkbox;
import java.awt.EventQueue;
import java.awt.FileDialog;
import java.awt.FlowLayout;
import java.awt.Frame;
Expand Down Expand Up @@ -56,21 +55,18 @@ public class MultipleMode {
""";

public static void main(String[] args) throws Exception {

PassFailJFrame passFailJFrame = PassFailJFrame
.builder()
.title("MultipleMode test instructions")
.instructions(INSTRUCTIONS)
.rows(15)
.columns(40)
.build();

EventQueue.invokeAndWait(MultipleMode::init);

passFailJFrame.awaitAndCheck();
PassFailJFrame
.builder()
.title("MultipleMode test instructions")
.instructions(INSTRUCTIONS)
.rows(15)
.columns(40)
.testUI(MultipleMode::init)
.build()
.awaitAndCheck();
}

private static void init() {
private static Frame init() {
Frame frame = new Frame("MultipleMode");
TextArea sysout = new TextArea("", 20, 80);
sysout.setEditable(false);
Expand All @@ -79,7 +75,7 @@ private static void init() {

Button open = new Button("open");
open.addActionListener(e -> {
FileDialog d = new FileDialog((Frame)null);
FileDialog d = new FileDialog(frame);
d.setMultipleMode(mode.getState());
d.setVisible(true);

Expand All @@ -104,10 +100,6 @@ private static void init() {

frame.pack();

PassFailJFrame.addTestWindow(frame);
PassFailJFrame.positionTestWindow(frame,
PassFailJFrame.Position.HORIZONTAL);

frame.setVisible(true);
return frame;
}
}

0 comments on commit a9f8e21

Please sign in to comment.