diff options
author | graydon <graydon@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-07 00:11:51 +0000 |
---|---|---|
committer | graydon <graydon@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-07 00:11:51 +0000 |
commit | 0e485bf7ae2fd939ed061cd835f5752e30931e4d (patch) | |
tree | 01d3ab4d0e125c801df6443fa9ea830bd2fb0b1a /libjava/java | |
parent | c95202ed30c9b9e96494a28d407435df1a337277 (diff) | |
download | ppe42-gcc-0e485bf7ae2fd939ed061cd835f5752e30931e4d.tar.gz ppe42-gcc-0e485bf7ae2fd939ed061cd835f5752e30931e4d.zip |
2004-01-06 Graydon Hoare <graydon@redhat.com>
* java/awt/Container.java (swapComponents): Add forgotten
function, required for JLayeredPane change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75491 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/awt/Container.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libjava/java/awt/Container.java b/libjava/java/awt/Container.java index e96b13d4bb5..ad43ce41a92 100644 --- a/libjava/java/awt/Container.java +++ b/libjava/java/awt/Container.java @@ -159,6 +159,25 @@ public class Container extends Component } /** + * 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. * |