StageStyle.EXTENDED & dialogs

Cormac Redmond credmond at certak.com
Fri Jun 13 13:49:20 UTC 2025


Hi,

To keep the conversation going on window icons / HeaderBar, here are some
observations/problems when using StageStyle.EXTENDED for a DialogPane (on
Windows):

   - You need a HeaderBar (at least to take up some space), and you'd need
   to set it via setHeader(), and if you already have actual header content,
   you'd need to wrap that content in (probably) a BorderPane (and put the
   HeaderBar in as top). E.g., it's quite a lot of work to do, everywhere
   required.
   - There's no way to control (hide or or disable) the window icons, all
   three are present
      - Usually with StageStyle.DECORATED, the dialog's minimise icon is
      disabled, preventing you from minimizing it: this is not the case with
      EXTENDED, it's enabled
   - If you minimise a modal/blocking dialog using the EXTENDED minimise
   icon, the dialog shrinks to just the size of the title bar, and (mostly)
   minimises to bottom left of the screen with just the window icons visible:
   and the whole application is then blocked; the minimized dialog's window
   icons, while visible, do nothing; so you cannot close or restore the
   dialog. Also, curiously, their colour changes in my example (presumably
   because a scene's fill has disappeared or something, changing from dark to
   light).
   - For Alerts, they'd typically get a StageStyle.UTILITY, I assume (i.e.,
   just an X window icon); so there are similar problems there when wishing to
   use EXTENDED, with an inability to control the window icons (even just to
   hide the minimise/restore buttons).

So overall, it seems impossible to leverage the new window icons to mimic
existing default behaviour with regards to dialogs/alerts. You'd need to
refrain from using EXTENDED for dialogs -- which is quite noticeable and
ugly, particularly if there are major colour changes between your main
window's title bar, and a dialog's (e.g., dark vs light).

I imagine developers using the EXTENDED window icons / HeaderBar will be
slow to adopt EXTENDED if their application has a non-uniform look-and-feel
for dialogs/popups, etc.




Kind Regards,
Cormac Redmond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250613/1e8d161a/attachment-0001.htm>


More information about the openjfx-dev mailing list