On Fri, 3 Jan 2025 03:01:48 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
> "OptionPane.buttonFont" and "OptionPane.messageFont" property are ignored for > Nimbus L&F as for Nimbus, lookup calls initiated by > BasicOptionPaneUI#configureButton and > BasicOptionPaneUI#configureMessageLabel, were redirected via SynthContext so > UIManager.getDefaults L&F properties were ignored.. > Added way to honor this properties for SynthOptionPaneUI..It could be later > extended for other UI properties for other widgets which may need UIManager > lookup.. I wonder if such a customisation is supported. Synth and Nimbus don't always use the `UIMaganager` to set the defaults. Perhaps, these Look-and-Feels should be excluded from this test. On the other hand, Swing usually allows such customisations and respects settings in `UIManger`… but doing so in Synth and Nimbus often looks inconsistent and requires special handling of UI-delegate classes. src/java.desktop/share/classes/javax/swing/plaf/synth/SynthDefaultLookup.java line 44: > 42: if (value != null) { > 43: return value; > 44: } It should probably call `super.getDefault` rather than use `UIManager` directly. test/jdk/javax/swing/JOptionPane/bug4174551.java line 26: > 24: /* > 25: * @test > 26: * @bug 4174551 8346260 Should the test exercise all available Look and Feels? ------------- PR Review: https://git.openjdk.org/jdk/pull/22908#pullrequestreview-2529127099 PR Review Comment: https://git.openjdk.org/jdk/pull/22908#discussion_r1901811650 PR Review Comment: https://git.openjdk.org/jdk/pull/22908#discussion_r1901817555