This is a suggestion for an enhancement.
The api already provides several convenience methods to create some standard menu items such as the Quit menu, Hide menu, Minimize menu, etc.
It would be useful to a have a method that creates the Preferences menu, which most application would have. The method could return a MenuItem with the name (Preferences...) and accelerator keys (⌘,). The user could then add an Event handler. Better yet, the method could take in the Event handler, as a parameter, so calling it might look something like this:
MenuItem prefsMenuItem = toolkit.createPreferencesMenuItem(event -> handlePreferences(event))
This is a suggestion for an enhancement.
The api already provides several convenience methods to create some standard menu items such as the Quit menu, Hide menu, Minimize menu, etc.
It would be useful to a have a method that creates the Preferences menu, which most application would have. The method could return a MenuItem with the name (Preferences...) and accelerator keys (⌘,). The user could then add an Event handler. Better yet, the method could take in the Event handler, as a parameter, so calling it might look something like this:
MenuItem prefsMenuItem = toolkit.createPreferencesMenuItem(event -> handlePreferences(event))