On Fri, 3 Feb 2023 17:12:46 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
> (1) This is an unique case..Normally, if there is no entry in > `MetalLookAndFeel.initClassDefaults`, it means corresponding `Basic**UI > class` will be used. However, in this case `MetalMenuBarUI `does not have > entry in `MetalLookAndFeel.initClassDefaults` rather it is registered in > `OceanTheme`, so it will not use `BasicMenuBarUI `even though `BasicMenuBarUI > `is present (2) If the Metal**UI class is to be used by a particular theme, > then yes it seems it needs to be registered in that theme and not in > MetalLookAndFeel.initClassDefaults > > If any Metal**UI is registered in MetalLookAndFeel.initClassDefaults, then it > means that Metal**UI will be used by all Metal Themes On that latter point "really?" I think you mean they all *happen* to use it ? That isn't the same thing as a specification or a "law" that they all DO use it. Once again, what if I wrote a new Theme that did NOT use one of these ? So the situation is nearly un-specifiable in any satisfactory way. Near as I can tell it actually amounts to "Since only one of the built-in themes use MetalMenuBarUI, the developer doing this work decided not to register it here, and let the single built-in theme that does, register it instead". ------------- PR: https://git.openjdk.org/jdk/pull/11646