On Tue, 21 Oct 2025 17:46:38 GMT, Anass Baya <[email protected]> wrote:

>> test/jdk/java/awt/print/PrinterJob/PageRanges.java line 51:
>> 
>>> 49:     public static void main(String args[]) throws Exception {
>>> 50:         PassFailJFrame passFailJFrame = new 
>>> PassFailJFrame(INSTRUCTIONS);
>>> 51:         passFailJFrame.positionTestWindow(null, 
>>> PassFailJFrame.Position.HORIZONTAL);
>> 
>> Use `PassFailJFrame.builder()` to configure and create an instance of 
>> `PassFailJFrame`.
>
> Hello @aivanov-jdk,
> Thank you for your review.
> I used this approach to position the instruction window on the left side of 
> the screen so that it won’t be hidden by the print dialog.
> Is it possible to do something similar with the PassFailJFrame.builder()?

The builder supports all the features that you can get when using a 
`PassFailJFrame` constructor and more.

When you have no test UI, the instructions frame will stay at the centre of the 
screen when you use the builder. When you call 
`PassFailJFrame.positionTestWindow(null, PassFailJFrame.Position.HORIZONTAL)`, 
the instructions frame is still moved to the left as if there's a test window.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27916#discussion_r2451579447

Reply via email to