`positionTestUI()` option is added to PassFailJFrame (PFJ). With this change multiple UI can be positioned using the PFJ new builder pattern by providing implementation for the Functional Interface `PositionWindows.positionTestWindows(List<? extends Window> testWindows,InstructionUI instructionUI)` in the test code.
Since the position implementation is done in test code it allows flexibility as the user can add custom positioning code per test UI requirements. Usage: PassFailJFrame.builder() .title("Test Instructions") .instructions(INSTRUCTIONS) .rows((int) INSTRUCTIONS.lines().count() + 3) .columns(30) .testUI(<TestClass::createAndShowUI>) .positionTestUI(<TestClass::positionMultiTestUI>) .build() .awaitAndCheck(); where positionMultiTestUI is the implementation for position of multiple test windows for `PositionWindows.positionTestWindows(List<? extends Window> testWindows,InstructionUI instructionUI)` ------------- Commit messages: - add positionTestUI() to PFJ builder pattern Changes: https://git.openjdk.org/jdk/pull/21023/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21023&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8340210 Stats: 29 lines in 1 file changed: 29 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/21023.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21023/head:pull/21023 PR: https://git.openjdk.org/jdk/pull/21023