On Fri, 15 Mar 2024 04:40:14 GMT, Alexander Zvegintsev <azveg...@openjdk.org> wrote:
> Often manual tests have a text area in the instruction window to print > feedback from the test to be evaluated by a tester. > I stumbled across another test that needed this, so I decided to make these > changes a standard feature. > > List of changes: > * The log text area can be added below the `Pass` and `Fail` buttons panel. > To do this, use the builder methods `logArea()`, `logArea(int rows)`. > * `PassFailJFrame.log(message)`, `PassFailJFrame.logClear()` and > `PassFailJFrame.logSet()` are added to control this text area. (maybe I > missed something?) > * added `invokeOnEDTUncheckedException' for easier use of logging methods > > So typical usage would be like: > > PassFailJFrame > .builder() > .title("GetBoundsResizeTest Instructions") > .instructions(INSTRUCTIONS) > .rows(20) > .columns(70) > .logArea() > .build() > .awaitAndCheck(); > > > ---- > > //somewhere in event handlers: > PassFailJFrame.log("Very important message"); test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 406: > 404: rows, columns, > 405: enableScreenCapture, > 406: false, 0), It is intentionally added only to the builder to avoid excessive changes to all constructors. It seems that the builder produces much cleaner code, so we probably shouldn't spend our time to changing a bunch of `PassFailJFrame` constructors, and at some point we can make the builder the only option available. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18319#discussion_r1525751536