<AWT Dev> [9] Review request for 8177919: java.awt.Desktop.setDefaultMenuBar​() should be specified to throw IllegalStateException

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Tue Apr 11 15:41:29 UTC 2017


please review the fix


for the issue


This fix removes throwing of ISE, this allows to use default menu bar 
with LaF's other than Aqua (with apple.laf.useScreenMenuBar set to true).

This became possible after JDK-8166683[0] fix.

Current documentation of Desktop.setDefaultMenuBar() has implnotes:

      * @implNote Aqua Look and Feel should be active to support this on 
Mac OS.

I leave it unchanged, since I don't want to advertise the 
apple.laf.useScreenMenuBar property.

[0] https://bugs.openjdk.java.net/browse/JDK-8166683


More information about the awt-dev mailing list