summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-05-10 21:44:35 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-05-10 21:44:35 +0000
commit2b9b3759704a3c84ee56ba77e0bd3cd5cd58e3ee (patch)
treeabd2b7a5848839998320e9de745a79641f0a9dd6
parent93eeec8e54c8fc01d45e5e7b8fef854dfb61a8c0 (diff)
downloadclasspath-2b9b3759704a3c84ee56ba77e0bd3cd5cd58e3ee.tar.gz
2006-05-10 Roman Kennke <kennke@aicas.com>
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 <kennke@aicas.com> PR classpath/27481 * javax/swing/JRootPane.java (createContentPane): Don't set background to null.
-rw-r--r--ChangeLog13
-rw-r--r--javax/swing/JRootPane.java1
-rw-r--r--javax/swing/plaf/basic/BasicInternalFrameUI.java9
3 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a4a8d4ff0..c0f28ffa8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-05-10 Roman Kennke <kennke@aicas.com>
+
+ 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 <kennke@aicas.com>
+
+ PR classpath/27481
+ * javax/swing/JRootPane.java
+ (createContentPane): Don't set background to null.
+
2006-05-09 Robert Schuster <robertschuster@fsfe.org>
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);
+ }
}
/**