RFR: 8359108: Mac - When Swing starts First, native application menu doesn't work for JavaFX [v8]

Martin Fox mfox at openjdk.org
Wed Jan 7 22:39:51 UTC 2026


On Wed, 7 Jan 2026 18:07:33 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Thanks for the fast reply!
>> 
>> I have removed all external dependencies and added a main method to each test. 
>> I also have added a README.md on how to compile and run the tests, since You need to add the javafx modules.
>
> @pabulaner  The latest version of the tests build and run fine for me. Thanks!
> 
> I'll do some additional testing and complete my review very soon. In the mean time, can you do two thing?
> 
> 1. Enable GitHub Actions (GHA) Workflows in your personal fork. This will allow sanity tests to run when you push code changes to your branch of your personal fork, and allow the Skara bot to report the results of the tests in the PR. Navigate to the home page of your GitHub repo, click on the "Actions" tab, and then click on the green button that says something like: "I understand my workflows, go ahead and enable them".
> 2. Merge (not rebase) the latest upstream master into your branch and push it. That will trigger a GHA test run on your now-up-to-date branch.

@kevinrushforth has indicated that he would like to get this into jfx26 if possible so we might want to move some of this cleanup to a follow-up PR.

At a minimum the JavaFX windows need to be made larger so the user can see the entire menu tree. And some instructions need to be added to the README.

As I understand it the user should launch the test, verify that the contents of the system menu bar match what's in the currently focused window, press the Next button, verify, press Next, verify, etc. The big issue is that the tests enter what are essentially busy loops waiting for the user to press Next. If you don't keep pressing Next all the way to the end things get very confusing. I think that needs to be re-thought but, again, we might want to push a re-write of that scope off to another PR.

A smaller issue is that the user doesn't know when to stop pressing Next. If there's an easy fix for that (like removing the Next button from the last window) you might consider doing that.

The one area not covered by these tests is what happens when *all* windows lose focus. The easiest way to make this happen is to iconify them all. Unfortunately this means there will be no windows around to provide guidance to the user. You might want to add a brief sentence to the README suggesting that after a test is done the user should iconify all the windows and verify that some system menu is still around. It's difficult to summarize what the expected results are. For strictly JavaFX windows they should see a single menu. For a mix of Swing and JavaFX windows they should see the set of menus associated with the last Swing window that had focus (assuming they can remember which one that was). Probably good enough to have the tester iconify all the windows and verify that the system doesn't explode.

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

PR Comment: https://git.openjdk.org/jfx/pull/1904#issuecomment-3721102930


More information about the openjfx-dev mailing list