Skip to content

Commit

Permalink
8346260: Test javax/swing/JOptionPane/bug4174551.java failed because …
Browse files Browse the repository at this point in the history
…the font size of message Hi 24 is not set to 24 in Nimbus LookAndFeel
  • Loading branch information
prsadhuk committed Jan 2, 2025
1 parent a0b7c4f commit 2163d29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
package javax.swing.plaf.synth;

import sun.swing.DefaultLookup;

import javax.swing.JComponent;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;

/**
Expand All @@ -35,6 +37,12 @@
*/
class SynthDefaultLookup extends DefaultLookup {
public Object getDefault(JComponent c, ComponentUI ui, String key) {
if (ui instanceof SynthOptionPaneUI) {
Object value = UIManager.get(key, c.getLocale());
if (value != null) {
return value;
}
}
if (!(ui instanceof SynthUI)) {
Object value = super.getDefault(c, ui, key);
return value;
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/javax/swing/JOptionPane/bug4174551.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/*
* @test
* @bug 4174551
* @bug 4174551 8346260
* @summary JOptionPane should allow custom buttons
* @library /java/awt/regtesthelpers
* @build PassFailJFrame
Expand Down

0 comments on commit 2163d29

Please sign in to comment.