From 2b9b3759704a3c84ee56ba77e0bd3cd5cd58e3ee Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Wed, 10 May 2006 21:44:35 +0000 Subject: 2006-05-10 Roman Kennke PR classpath/27481 * javax/swing/plaf/basic/BasicInternalFrameUI.java (installDefaults): Set background of content pane to null, if no custom color has been installed by the application yet. 2006-05-10 Roman Kennke PR classpath/27481 * javax/swing/JRootPane.java (createContentPane): Don't set background to null. --- ChangeLog | 13 +++++++++++++ javax/swing/JRootPane.java | 1 - javax/swing/plaf/basic/BasicInternalFrameUI.java | 9 +++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a4a8d4ff0..c0f28ffa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2006-05-10 Roman Kennke + + PR classpath/27481 + * javax/swing/plaf/basic/BasicInternalFrameUI.java + (installDefaults): Set background of content pane to null, if + no custom color has been installed by the application yet. + +2006-05-10 Roman Kennke + + PR classpath/27481 + * javax/swing/JRootPane.java + (createContentPane): Don't set background to null. + 2006-05-09 Robert Schuster PR classpath/24216 diff --git a/javax/swing/JRootPane.java b/javax/swing/JRootPane.java index 5c4723596..a2cd9c7a0 100644 --- a/javax/swing/JRootPane.java +++ b/javax/swing/JRootPane.java @@ -551,7 +551,6 @@ public class JRootPane extends JComponent implements Accessible JPanel p = new JPanel(); p.setName(this.getName() + ".contentPane"); p.setLayout(new BorderLayout()); - p.setBackground(null); return p; } diff --git a/javax/swing/plaf/basic/BasicInternalFrameUI.java b/javax/swing/plaf/basic/BasicInternalFrameUI.java index 0a330e776..7ec3aa074 100644 --- a/javax/swing/plaf/basic/BasicInternalFrameUI.java +++ b/javax/swing/plaf/basic/BasicInternalFrameUI.java @@ -1205,6 +1205,15 @@ public class BasicInternalFrameUI extends InternalFrameUI frame.setLayout(internalFrameLayout); LookAndFeel.installBorder(frame, "InternalFrame.border"); frame.setFrameIcon(UIManager.getIcon("InternalFrame.icon")); + + // Let the content pane inherit the background color from its + // frame by setting the background to null. + Component contentPane = frame.getContentPane(); + if (contentPane != null + && contentPane.getBackground() instanceof UIResource) + { + contentPane.setBackground(null); + } } /** -- cgit v1.2.1