On Tue, 19 Mar 2024 00:31:27 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
>> Damon Nguyen has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Remove unused frame >> - splitUI addition. Add forceFail > > test/jdk/java/awt/print/Dialog/PrintModalDialog.java line 70: > >> 68: .rows(10) >> 69: .columns(40) >> 70: .testUI(PrintModalDialog::createAndShowGUI) > > Since the testUI is a simple "Print" button PassFailJFrame's spiltUIBottom() > can be used with just a JButton to simplify the UI. Added, thanks > test/jdk/java/awt/print/Dialog/PrintModalDialog.java line 127: > >> 125: } >> 126: catch (java.awt.print.PrinterException ex) { >> 127: ex.printStackTrace(); > > It is better to use PassFailJFrame.forceFail() when a printer exception > occurs else the timer keeps running and the error is swallowed even after a > printer exception has occurred. > > Suggestion: > > catch (java.awt.print.PrinterException ex) { > ex.printStackTrace(); > String msg = "PrinterException: " + ex.getMessage(); > PassFailJFrame.forceFail(msg); Thanks for the suggestion. Added as suggested ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18362#discussion_r1530930647 PR Review Comment: https://git.openjdk.org/jdk/pull/18362#discussion_r1530931261