Easier placement of stages with positioning anchor
Michael Strauß
michaelstrau2 at gmail.com
Tue Nov 25 22:09:10 UTC 2025
> This is just about convenience, since all the desired positions can be pre-computed and the Stage can be positioned using existing public APIs, right?
Mostly yes, it's for convenience because there's quite a bit of math
going on which you're unlikely to replicate in a minute.
But there's a small no, it's not just about convenience: if you don't
set the size of the stage, then you won't know its actual size until
it is shown. But by the time it's shown, it is too late to adjust its
position (you might get a short flicker because the window is
repositioned right after it is shown).
The implementation here adjusts the position right before the window
is shown, that's something that user code can't do (look for
Window::fixBounds).
More information about the openjfx-dev
mailing list