diff --git a/test/jdk/java/awt/print/Dialog/DialogOrient.java b/test/jdk/java/awt/print/Dialog/DialogOrient.java index 92b3c65e64262..c8009d742d737 100644 --- a/test/jdk/java/awt/print/Dialog/DialogOrient.java +++ b/test/jdk/java/awt/print/Dialog/DialogOrient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,8 +69,8 @@ private static void init() throws Exception { Sysout.printInstructions( instructions ); PrinterJob job = PrinterJob.getPrinterJob(); - job.setPrintable(new DialogOrient()); PageFormat landscape = job.pageDialog(job.defaultPage()); + job.setPrintable(new DialogOrient(), landscape); if (job.printDialog()) { job.print();