[External] : Re: Easier placement of stages with positioning anchor
Michael Strauß
michaelstrau2 at gmail.com
Tue Nov 25 22:47:32 UTC 2025
> I see, thanks for clarifying!
>
> This seems interesting - perhaps it can be extended further to support the following scenarios:
>
> - allow to specify the anchor in terms of exact pixels relative to the Stage origin (as opposed to fraction of its size)
You can do that with an absolute anchor: Anchor.ofAbsolute(50, 50)
> - allow to specify the fallback policy for when the Stage cannot be positioned as requested (e.g. similar to a context menu popup). For example, [no relocation, only vertically, only horizontally, in any direction]
I also thought about that. However, if you don't want the
auto-relocation behavior, then maybe you're better off just manually
calculating X/Y in this case.
On the other hand, we could add another parameter to the new show()
and showAndWait() methods, which would then probably be an enum with
the options you listed.
More information about the openjfx-dev
mailing list