I am not sure it is a general JVM question. I am not writing a Swing app. I am writing a compose desktop app. I never asked for a menu with a Quit menu item. I never asked for a shortcut (command-q) to terminate the app. Swing is an internal implementation detail which is not surfaced in any of the code I have written so far. I think it should stay that way. It is fine if there is a workaround for the time being, but I really think that this should be handled by compose... something like
application(onQuit = {...}) {
Window(..) { ... }
}