This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[FYI] patch to JLayeredPane.java
- From: graydon hoare <graydon at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Tue, 06 Jan 2004 19:14:20 -0500
- Subject: [FYI] patch to JLayeredPane.java
hi,
I have just committed this extra hunk to Container.java, which was
missing from my patch earlier today to JLayeredPane.java, and had
temporarily interfered with libjava's buildability. it should be back to
normal now.
sorry.
-graydon
2004-01-06 Graydon Hoare <graydon@redhat.com>
* java/awt/Container.java (swapComponents): Add forgotten
function, required for JLayeredPane change.
--- java/awt/Container.java 12 Aug 2003 20:23:22 -0000 1.26
+++ java/awt/Container.java 7 Jan 2004 00:11:51 -0000 1.27
@@ -159,6 +159,25 @@
}
/**
+ * Swaps the components at position i and j, in the container.
+ */
+
+ protected void swapComponents (int i, int j)
+ {
+ synchronized (getTreeLock ())
+ {
+ if (i < 0
+ || i >= component.length
+ || j < 0
+ || j >= component.length)
+ throw new ArrayIndexOutOfBoundsException ();
+ Component tmp = component[i];
+ component[i] = component[j];
+ component[j] = tmp;
+ }
+ }
+
+ /**
* Returns the insets for this container, which is the space used for
* borders, the margin, etc.
*