On Mon, 30 Mar 2026 21:13:19 GMT, Christopher Schnick <[email protected]> wrote:
>> This fixes issues with Alerts when the owner stage is not a valid stage with >> a scene and currently showing > > Christopher Schnick has updated the pull request incrementally with one > additional commit since the last revision: > > Add tests for centering So the NPE is gone, very good. What is not yet clear to me is how it chooses where to show the alert when the parent Stage is not shown. Arguably, this is not a good state, so I'd expect the alert to show maybe at the center of the screen (which screen, btw, if we have two?) So, using this reproducer https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/bugs/Alert_NPE_8380926.java where the NPE button focuses on a different stage before showing up the alert, I get the following picture (top menu / bottom dock is trimmed). Before clicking on the NPE button, I moved both of the windows from their original positions: <img width="1793" height="1068" alt="Screenshot 2026-04-07 at 09 27 30" src="https://github.com/user-attachments/assets/7119302a-6963-46ae-be8c-37d88f8aae1e" /> What I see is the alert showing up not at the center of the screen but somewhere closer to the top side of the screen. Similarly, if I move both stages to a different screen, the alert still appears on the primary screen. Why is that? ------------- PR Comment: https://git.openjdk.org/jfx/pull/2127#issuecomment-4200685894
