----- Forwarded message from ----- To: classpath-patches@gnu.org Subject: FYI: Fix for PR34577
This allows the root pane of a JFrame to be changed by a subclass, fixing PR34577. Changelog: 2007-12-25 Andrew John Hughes <[EMAIL PROTECTED]> PR classpath/34577: * javax/swing/JFrame.java: (addImpl(Component,Object,int)): Add a similar check for the root pane as in remove, adding using the superclass when this occurs rather than the content pane. -- Andrew :-) Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } Index: javax/swing/JFrame.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JFrame.java,v retrieving revision 1.37 diff -u -3 -p -u -r1.37 JFrame.java --- javax/swing/JFrame.java 18 Oct 2006 09:18:55 -0000 1.37 +++ javax/swing/JFrame.java 25 Dec 2007 01:21:00 -0000 @@ -258,7 +258,7 @@ public class JFrame extends Frame { // If we're adding in the initialization stage use super.add. // Otherwise pass the add onto the content pane. - if (isRootPaneCheckingEnabled()) + if (isRootPaneCheckingEnabled() && comp != rootPane) getContentPane().add(comp,constraints,index); else super.addImpl(comp, constraints, index); ----- End forwarded message ----- -- Andrew :-) Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... }
signature.asc
Description: Digital signature