On Tue, 12 Sep 2023 13:04:09 GMT, Alexander Zvegintsev <[email protected]> wrote:
> Sometimes we may need to create more than one window(e.g. some DnD test with > two windows). Perhaps we should consider that here by adding `List<Window> > createTestUI()`. I thought about it. Yet I couldn't find a simple scenario where multiple windows need to be created. When there are multiple windows, you have to position them. The positions of the windows may depend on the position of the instruction frame. In #12447, Harshitha @honkar-jdk managed many test windows. I decided to handle the most common scenario: *one test window*. This can be extended in the future by creating `WindowListCreator` interface, its `createTestUI` method will return a list or a collection: `List<Window>` or `Collection<Window>`. Changing the signature of the existing `WindowCreator.createTestUI` could also be possible without breaking backwards compatibility. Now that I think about it more, you have a point… *Why not allow passing a list of windows right away?* However, to test this case I'll need a (simple) scenario where multiple windows are created. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15665#discussion_r1323058859
