On Wed, 22 Oct 2025 15:03:08 GMT, Anass Baya <[email protected]> wrote:
>> Following issues were fixed in this test
>>
>> 1. Fixed - Parser error due to yesno in @run main/manual=yesno
>> 2. Fixed Wrong test name specified in @run jtreg
>> 3. @run main/manual=yesno PrintTextTest . It should be @run
>> main/manual=yesno SwingUIText
>> 4. Use PassFailJFrame test framework
>> 5. Enhance Instructions
>> 6. Skip the test if no Printer is available
>
> Anass Baya has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - add "manual" tag
> - Align instructions
test/jdk/java/awt/print/PrinterJob/SwingUIText.java line 30:
> 28: * @summary Test that text printed in Swing UI measures and looks OK.
> 29: * @library /java/awt/regtesthelpers /test/lib
> 30: * @library /test/lib
Do you have `/test/lib` twice?
test/jdk/java/awt/print/PrinterJob/SwingUIText.java line 89:
> 87: frame = new JFrame();
> 88: JPanel panel = new JPanel();
> 89: panel.setLayout(new GridLayout(4,1));
Suggestion:
frame = new JFrame();
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(4, 1));
Just because I happened to see it, you can add a space here to follow the
precedent like in `displayText` just below this.
test/jdk/java/awt/print/PrinterJob/SwingUIText.java line 126:
> 124: static void displayText(JPanel p, String text) {
> 125: JPanel panel = new JPanel();
> 126: panel.setLayout(new GridLayout(2,1));
Suggestion:
panel.setLayout(new GridLayout(2, 1));
There is also another purely syntax issue slightly below this by adding spaces
around the `+`:
JButton button = new JButton("Print " + text);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27938#discussion_r2453342500
PR Review Comment: https://git.openjdk.org/jdk/pull/27938#discussion_r2453347020
PR Review Comment: https://git.openjdk.org/jdk/pull/27938#discussion_r2453352039