On Tue, 13 Dec 2022 09:56:47 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
> Spec for > [MetalLookAndFeel](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java#L247) > says: > "...MetalLookAndFeel registers an entry for each of the classes > in the package javax.swing.plaf.metal that are named MetalXXXUI. > The string XXX is one of Swing's uiClassIDs. For the uiClassIDs > that do not have a class in metal, the corresponding class in > javax.swing.plaf.basic is used. For example, metal does not > have a class named "MetalColorChooserUI", as such, > javax.swing.plaf.basic.BasicColorChooserUI is used". > > There is class MetalMenuBarUI, but the method populates given defaults table > with the value > "javax.swing.plaf.basic.BasicMenuBarUI". > > Added entry for MetalMenuBarUI.. > CI tests including JCK tests are ok. Probably we should follow this suggestion from the JBS: > This class is only appropriate for Ocean. The spec needs to be updated to > mention this. src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java line 276: > 274: "LabelUI", metalPackageName + "MetalLabelUI", > 275: "MenuBarUI", metalPackageName + "MetalMenuBarUI", > 276: "PopupMenuSeparatorUI", metalPackageName + > "MetalPopupMenuSeparatorUI", I think it is installed by the Ocean theme, which is used by the Metal L&F by default. ------------- PR: https://git.openjdk.org/jdk/pull/11646