mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8346260: Test "javax/swing/JOptionPane/bug4174551.java" failed because the font size of message "Hi 24" is not set to 24 in Nimbus LookAndFeel
Reviewed-by: aivanov, dnguyen
This commit is contained in:
parent
e98f412663
commit
9393897817
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -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;
|
||||
|
||||
/**
|
||||
@ -35,6 +37,12 @@ import javax.swing.plaf.ComponentUI;
|
||||
*/
|
||||
class SynthDefaultLookup extends DefaultLookup {
|
||||
public Object getDefault(JComponent c, ComponentUI ui, String key) {
|
||||
if (ui instanceof SynthOptionPaneUI) {
|
||||
Object value = super.getDefault(c, ui, key);
|
||||
if (value != null) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
if (!(ui instanceof SynthUI)) {
|
||||
Object value = super.getDefault(c, ui, key);
|
||||
return value;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4174551
|
||||
* @bug 4174551 8346260
|
||||
* @summary JOptionPane should allow custom buttons
|
||||
* @library /java/awt/regtesthelpers
|
||||
* @build PassFailJFrame
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user