Fixes bug 25124
2005-12-22 Lillian Angel <[EMAIL PROTECTED]>
PR classpath/25124
* javax/swing/JInternalFrame.java
(show): Removed call moveToFront. Listeners already call
toFront, which calls moveToFront.
* javax/swing/JLayeredPane.java
(setPosition): Positions are assigned from the "front"
to the "back", and drawn from the back towards the front. Added
a loop to swap all the components, so they are in the correct
layer.
Index: javax/swing/JInternalFrame.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JInternalFrame.java,v
retrieving revision 1.22
diff -u -r1.22 JInternalFrame.java
--- javax/swing/JInternalFrame.java 7 Nov 2005 22:05:10 -0000 1.22
+++ javax/swing/JInternalFrame.java 22 Dec 2005 20:45:35 -0000
@@ -1628,7 +1628,7 @@
{
if (! isVisible())
{
- moveToFront();
super.show();
JDesktopPane pane = getDesktopPane();
Index: javax/swing/JLayeredPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JLayeredPane.java,v
retrieving revision 1.33
diff -u -r1.33 JLayeredPane.java
--- javax/swing/JLayeredPane.java 14 Nov 2005 12:53:10 -0000 1.33
+++ javax/swing/JLayeredPane.java 22 Dec 2005 20:45:35 -0000
@@ -436,7 +436,12 @@
// should have found it
throw new IllegalArgumentException();
- super.swapComponents (curr, targ);
+ if (curr == 0)
+ super.swapComponents(curr, targ);
+ else
+ while (curr > 0)
+ super.swapComponents (curr, --curr);
+
revalidate();
repaint();
}
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches