On Wed, 18 Sep 2024 10:52:28 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

> > Actually, I thought `.positionTestWindow` would be called for the first 
> > window automatically, then you can position other windows based on the 
> > assigned location. Eventually, it's not called at all if a list of windows 
> > is created.
> > I'll submit a bug for it.
> 
> Submitted [JDK-8340365](https://bugs.openjdk.org/browse/JDK-8340365): 
> _Position the first window of a window list_.

If that had been the case, you would've used `componentMoved` and the code 
would've been shorter by 1 line as shown in #21057:


    @Override
    public void componentMoved(ComponentEvent e) {
        testFrame.setLocation(firstFrame.getX(),
                              firstFrame.getY() + firstFrame.getHeight() + 8);
    }

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21029#discussion_r1764963245

Reply via email to