On Mon, 16 Sep 2024 21:38:36 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
>> `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 as per test UI requirements. >> >> Usage: >> >> PassFailJFrame.builder() >> .title("Test Instructions") >> .instructions(INSTRUCTIONS) >> .rows(int) >> .columns(int) >> .testUI(<TestClass::createAndShowUI>) >> .positionTestUI(<TestClass::positionMultiTestUI>) >> .build() >> .awaitAndCheck(); >> >> where positionMultiTestUI is the implementation for positioning of multiple >> test windows for `PositionWindows.positionTestWindows(List<? extends Window> >> testWindows,InstructionUI instructionUI)` >> >> @aivanov-jdk has demonstrated custom test UI positioning in this PR: >> **[8294156: Demo positioning of multiple test >> windows](https://github.com/openjdk/jdk/pull/15721)** > > Harshitha Onkar has updated the pull request incrementally with one > additional commit since the last revision: > > removed errorenous check There has been no need for multiple test windows for nearly a year, it's not the most used feature. This is why I think we can add common layouts later rather than *rush it* right now. A few tests are also easy to update, and these tests would be a live demo for the improvement. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21023#issuecomment-2355083435