Skip to content

Commit

Permalink
Revert "Add logArea placeholder text"
Browse files Browse the repository at this point in the history
This reverts commit 77e5e4a.
  • Loading branch information
azvegint committed Mar 15, 2024
1 parent 77e5e4a commit 07cb0b8
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions test/jdk/java/awt/regtesthelpers/PassFailJFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ public final class PassFailJFrame {
private static Robot robot;

private static JTextArea logArea;
private static boolean isLogAreaFirstAppend = true;

public enum Position {HORIZONTAL, VERTICAL, TOP_LEFT_CORNER}

Expand Down Expand Up @@ -479,8 +478,7 @@ private static JComponent createInstructionUIPanel(String instructions,
}

if (addLogArea) {
logArea = new JTextArea("(the test log will be here)",
logAreaRows, columns);
logArea = new JTextArea(logAreaRows, columns);
logArea.setEditable(false);

Box buttonsLogPanel = Box.createVerticalBox();
Expand Down Expand Up @@ -1084,14 +1082,7 @@ public static void forceFail(String reason) {
* @param message to log
*/
public static void log(String message) {
invokeOnEDTUncheckedException(() -> {
if (isLogAreaFirstAppend) {
logArea.setText(message + "\n");
isLogAreaFirstAppend = false;
} else {
logArea.append(message + "\n");
}
});
invokeOnEDTUncheckedException(() -> logArea.append(message + "\n"));
}

/**
Expand Down

0 comments on commit 07cb0b8

Please sign in to comment.