Creating an offscreen frame in Java (or: how to avoid a blank menu on a Mac, when all application windows are closed)?

后端 未结 6 1856
囚心锁ツ
囚心锁ツ 2020-12-19 08:55

I am making a Mac application, and I want my menu bar to look right.

Any Mac user knows the menu bar should be in the top screen menu. Setting apple.laf.useSc

6条回答
  •  再見小時候
    2020-12-19 09:29

    First a note: your question seems really to be "How to have a Window menu following the Apple Human Interface Guidelines" and not "creating an offscreen frame in Java", which seems like a monstrous hack.

    I suggest checking Apple's "Mac OS X Integration for Java", which, under "Window menu", shows apparently exactly what you're trying to achieve:

    Apple Human Interface Guidelines suggests that all Mac OS X applications should provide a Window menu to keep track of all currently open windows. A Window menu should contain a list of windows, with a checkmark next to the active window.

提交回复
热议问题