8340306: Add border around instructions in PassFailJFrame

Reviewed-by: honkar, prr
This commit is contained in:
Alexey Ivanov 2024-09-19 11:48:45 +00:00
parent 2faf8b8d58
commit 0120d3eed5

View File

@ -74,6 +74,7 @@ import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.StyleSheet; import javax.swing.text.html.StyleSheet;
import static java.util.Collections.unmodifiableList; import static java.util.Collections.unmodifiableList;
import static javax.swing.BorderFactory.createEmptyBorder;
import static javax.swing.SwingUtilities.invokeAndWait; import static javax.swing.SwingUtilities.invokeAndWait;
import static javax.swing.SwingUtilities.isEventDispatchThread; import static javax.swing.SwingUtilities.isEventDispatchThread;
@ -501,6 +502,7 @@ public final class PassFailJFrame {
JTextArea text = new JTextArea(instructions, rows, columns); JTextArea text = new JTextArea(instructions, rows, columns);
text.setLineWrap(true); text.setLineWrap(true);
text.setWrapStyleWord(true); text.setWrapStyleWord(true);
text.setBorder(createEmptyBorder(4, 4, 4, 4));
return text; return text;
} }